List:Commits« Previous MessageNext Message »
From:gluh Date:March 15 2006 11:49am
Subject:bk commit into 5.0 tree (gluh:1.2085) BUG#18113
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2085 06/03/15 14:49:34 gluh@stripped +3 -0
  Fix for bug#18113 SELECT * FROM information_schema.xxx crashes server
    Here is just one table so there is no need to use UINT_MAX as number of tables,
    use 1 instead.

  sql/sql_show.cc
    1.312 06/03/15 14:49:28 gluh@stripped +1 -1
    Fix for bug#18113 SELECT * FROM information_schema.xxx crashes server
      Here is just one table so there is no need to use UINT_MAX as number of tables,
      use 1 instead.

  mysql-test/t/information_schema_db.test
    1.3 06/03/15 14:49:28 gluh@stripped +26 -0
    Fix for bug#18113 SELECT * FROM information_schema.xxx crashes server
     test case

  mysql-test/r/information_schema_db.result
    1.6 06/03/15 14:49:27 gluh@stripped +14 -0
    Fix for bug#18113 SELECT * FROM information_schema.xxx crashes server
     test case

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Merge/5.0

--- 1.311/sql/sql_show.cc	Fri Mar 10 15:40:12 2006
+++ 1.312/sql/sql_show.cc	Wed Mar 15 14:49:28 2006
@@ -328,7 +328,7 @@ mysql_find_files(THD *thd,List<char> *fi
       table_list.table_name= file->name;
       table_list.table_name_length= strlen(file->name);
       table_list.grant.privilege=col_access;
-      if (check_grant(thd, TABLE_ACLS, &table_list, 1, UINT_MAX, 1))
+      if (check_grant(thd, TABLE_ACLS, &table_list, 1, 1, 1))
         continue;
     }
 #endif

--- 1.5/mysql-test/r/information_schema_db.result	Sun Jan 29 05:44:11 2006
+++ 1.6/mysql-test/r/information_schema_db.result	Wed Mar 15 14:49:27 2006
@@ -27,4 +27,18 @@ create database `inf%`;
 use `inf%`;
 show tables;
 Tables_in_inf%
+grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
+create table t1 (f1 int);
+create function func1(curr_int int) returns int
+begin
+declare ret_val int;
+select max(f1) from t1 into ret_val;
+return ret_val;
+end|
+create view v1 as select f1 from t1 where f1 = func1(f1);
+select * from information_schema.tables;
+drop user mysqltest_1@localhost;
+drop view v1;
+drop function func1;
+drop table t1;
 drop database `inf%`;

--- 1.2/mysql-test/t/information_schema_db.test	Tue May 24 15:35:16 2005
+++ 1.3/mysql-test/t/information_schema_db.test	Wed Mar 15 14:49:28 2006
@@ -8,4 +8,30 @@ show tables from INFORMATION_SCHEMA like
 create database `inf%`;
 use `inf%`;
 show tables;
+
+#
+# Bug#18113 SELECT * FROM information_schema.xxx crashes server
+#
+grant all privileges on `inf%`.* to 'mysqltest_1'@'localhost';
+create table t1 (f1 int);
+delimiter |;
+create function func1(curr_int int) returns int
+begin
+  declare ret_val int;
+  select max(f1) from t1 into ret_val;
+  return ret_val;
+end|
+delimiter ;|
+create view v1 as select f1 from t1 where f1 = func1(f1);
+connect (user1,localhost,mysqltest_1,,);
+connection user1;
+--disable_result_log
+select * from information_schema.tables;
+--enable_result_log
+connection default;
+drop user mysqltest_1@localhost;
+drop view v1;
+drop function func1;
+drop table t1;
+
 drop database `inf%`;
Thread
bk commit into 5.0 tree (gluh:1.2085) BUG#18113gluh15 Mar