Loading mysql-test/r/information_schema.result +7 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,13 @@ sub1 sub1 select count(*) from information_schema.ROUTINES; count(*) 2 create view v1 as select routine_schema, routine_name from information_schema.routines order by routine_schema, routine_name; select * from v1; routine_schema routine_name test sel2 test sub1 drop view v1; select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; ROUTINE_NAME ROUTINE_DEFINITION show create function sub1; Loading mysql-test/t/information_schema.test +5 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,11 @@ select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a, mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1; select count(*) from information_schema.ROUTINES; create view v1 as select routine_schema, routine_name from information_schema.routines order by routine_schema, routine_name; select * from v1; drop view v1; connect (user1,localhost,mysqltest_1,,); connection user1; select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; Loading sql/sql_show.cc +2 −1 Original line number Diff line number Diff line Loading @@ -3864,7 +3864,8 @@ bool get_schema_tables_result(JOIN *join) TABLE_LIST *table_list= tab->table->pos_in_table_list; if (table_list->schema_table && thd->fill_derived_tables()) { bool is_subselect= (&lex->unit != lex->current_select->master_unit()); bool is_subselect= (&lex->unit != lex->current_select->master_unit() && lex->current_select->master_unit()->item); /* The schema table is already processed and the statement is not a subselect. Loading Loading
mysql-test/r/information_schema.result +7 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,13 @@ sub1 sub1 select count(*) from information_schema.ROUTINES; count(*) 2 create view v1 as select routine_schema, routine_name from information_schema.routines order by routine_schema, routine_name; select * from v1; routine_schema routine_name test sel2 test sub1 drop view v1; select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; ROUTINE_NAME ROUTINE_DEFINITION show create function sub1; Loading
mysql-test/t/information_schema.test +5 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,11 @@ select a.ROUTINE_NAME, b.name from information_schema.ROUTINES a, mysql.proc b where a.ROUTINE_NAME = convert(b.name using utf8) order by 1; select count(*) from information_schema.ROUTINES; create view v1 as select routine_schema, routine_name from information_schema.routines order by routine_schema, routine_name; select * from v1; drop view v1; connect (user1,localhost,mysqltest_1,,); connection user1; select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES; Loading
sql/sql_show.cc +2 −1 Original line number Diff line number Diff line Loading @@ -3864,7 +3864,8 @@ bool get_schema_tables_result(JOIN *join) TABLE_LIST *table_list= tab->table->pos_in_table_list; if (table_list->schema_table && thd->fill_derived_tables()) { bool is_subselect= (&lex->unit != lex->current_select->master_unit()); bool is_subselect= (&lex->unit != lex->current_select->master_unit() && lex->current_select->master_unit()->item); /* The schema table is already processed and the statement is not a subselect. Loading