mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
subselect transformation moved in after-fix_field place
removed "of is null" if it is possible (this cset should be SCRUM related, but not approved as scrum task yet) mysql-test/r/subselect.result: new subselect test result (new place of error detecting & and more subselect reducing) sql/item.cc: layout fix sql/item.h: unneed ';' fixed print pethod sql/item_cmpfunc.cc: new method to support transformation after fix_fields sql/item_cmpfunc.h: new method to support transformation after fix_fields fixed Item printing sql/item_subselect.cc: new transformation sql/item_subselect.h: new transformation sql/sql_derived.cc: 'table' & 'table_list' now is not union sql/sql_lex.cc: 'table' & 'table_list' now is not union to support reinit only shared tables (but all) sql/sql_lex.h: mark fake st_select_lex sql/sql_olap.cc: fixed table assignment TODO added sql/sql_select.cc: 'table' & 'table_list' now is not union transforming subselect sql/sql_union.cc: prepare make on fix_fields sql/sql_yacc.yy: fixed layout sql/table.h: 'table & 'table_list' now is different fields
This commit is contained in:
@ -201,7 +201,8 @@ void relink_tables(SELECT_LEX *select_lex)
|
||||
for (TABLE_LIST *cursor= (TABLE_LIST *) select_lex->table_list.first;
|
||||
cursor;
|
||||
cursor=cursor->next)
|
||||
cursor->table= cursor->table_list->table;
|
||||
if (cursor->table_list)
|
||||
cursor->table= cursor->table_list->table;
|
||||
}
|
||||
|
||||
|
||||
@ -314,6 +315,19 @@ JOIN::prepare(Item ***rref_pointer_array,
|
||||
having->split_sum_func(ref_pointer_array, all_fields);
|
||||
}
|
||||
|
||||
// Is it subselect
|
||||
{
|
||||
Item_subselect *subselect;
|
||||
if ((subselect= select_lex->master_unit()->item) &&
|
||||
!select_lex->fake_select)
|
||||
{
|
||||
Item_subselect::trans_res res;
|
||||
if ((res= subselect->select_transformer(thd, this)) !=
|
||||
Item_subselect::OK)
|
||||
DBUG_RETURN((res == Item_subselect::ERROR));
|
||||
}
|
||||
}
|
||||
|
||||
if (setup_ftfuncs(select_lex)) /* should be after having->fix_fields */
|
||||
DBUG_RETURN(-1);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user