Loading mysql-test/r/information_schema.result +12 −0 Original line number Diff line number Diff line Loading @@ -1013,3 +1013,15 @@ grant all on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' grant select on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' use test; create table t1(id int); insert into t1(id) values (1); select 1 from (select 1 from test.t1) a; 1 1 use information_schema; select 1 from (select 1 from test.t1) a; 1 1 use test; drop table t1; mysql-test/t/information_schema.test +12 −0 Original line number Diff line number Diff line Loading @@ -715,3 +715,15 @@ select ROUTINE_NAME from routines; grant all on information_schema.* to 'user1'@'localhost'; --error 1044 grant select on information_schema.* to 'user1'@'localhost'; # # Bug#14089 FROM list subquery always fails when information_schema is current database # use test; create table t1(id int); insert into t1(id) values (1); select 1 from (select 1 from test.t1) a; use information_schema; select 1 from (select 1 from test.t1) a; use test; drop table t1; sql/sql_parse.cc +2 −2 Original line number Diff line number Diff line Loading @@ -6197,7 +6197,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX); ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES); ptr->derived= table->sel; if (!my_strcasecmp(system_charset_info, ptr->db, if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db, information_schema_name.str)) { ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name); Loading Loading
mysql-test/r/information_schema.result +12 −0 Original line number Diff line number Diff line Loading @@ -1013,3 +1013,15 @@ grant all on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' grant select on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' use test; create table t1(id int); insert into t1(id) values (1); select 1 from (select 1 from test.t1) a; 1 1 use information_schema; select 1 from (select 1 from test.t1) a; 1 1 use test; drop table t1;
mysql-test/t/information_schema.test +12 −0 Original line number Diff line number Diff line Loading @@ -715,3 +715,15 @@ select ROUTINE_NAME from routines; grant all on information_schema.* to 'user1'@'localhost'; --error 1044 grant select on information_schema.* to 'user1'@'localhost'; # # Bug#14089 FROM list subquery always fails when information_schema is current database # use test; create table t1(id int); insert into t1(id) values (1); select 1 from (select 1 from test.t1) a; use information_schema; select 1 from (select 1 from test.t1) a; use test; drop table t1;
sql/sql_parse.cc +2 −2 Original line number Diff line number Diff line Loading @@ -6197,7 +6197,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX); ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES); ptr->derived= table->sel; if (!my_strcasecmp(system_charset_info, ptr->db, if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db, information_schema_name.str)) { ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name); Loading