mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 09:04:29 +02:00
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
Fill schema tables with data before filesort if it's necessary
mysql-test/r/information_schema.result:
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
test result
mysql-test/t/information_schema.test:
Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
test case
This commit is contained in:
parent
74f670f291
commit
333b1f8594
6 changed files with 37 additions and 1 deletions
|
|
@ -3845,7 +3845,16 @@ 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())
|
||||
{
|
||||
if (&lex->unit != lex->current_select->master_unit()) // is subselect
|
||||
bool is_subselect= (&lex->unit != lex->current_select->master_unit());
|
||||
/*
|
||||
The schema table is already processed and
|
||||
the statement is not a subselect.
|
||||
So we don't need to handle this table again.
|
||||
*/
|
||||
if (table_list->is_schema_table_processed && !is_subselect)
|
||||
continue;
|
||||
|
||||
if (is_subselect) // is subselect
|
||||
{
|
||||
table_list->table->file->extra(HA_EXTRA_RESET_STATE);
|
||||
table_list->table->file->delete_all_rows();
|
||||
|
|
@ -3858,6 +3867,7 @@ bool get_schema_tables_result(JOIN *join)
|
|||
if (table_list->schema_table->fill_table(thd, table_list,
|
||||
tab->select_cond))
|
||||
result= 1;
|
||||
table_list->is_schema_table_processed= TRUE;
|
||||
}
|
||||
}
|
||||
thd->no_warnings_for_error= 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue