mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
support of subselect without FROM reducing (SCRUM)
fixed bug of calling setup_fields without correct lex->current_select pointer in mysql_derived more correct creation of reference in Item_field::fix_field mysql-test/r/subselect.result: new explain with subselect reduced mysql-test/t/subselect.test: new explain with subselect reduced sql/item.cc: support of subselect without FROM reducing more correct creation of reference in Item_field::fix_field sql/item.h: support of subselect without FROM reducing sql/item_cmpfunc.cc: support of subselect without FROM reducing sql/item_cmpfunc.h: support of subselect without FROM reducing sql/item_func.cc: support of subselect without FROM reducing sql/item_func.h: support of subselect without FROM reducing sql/item_row.cc: support of subselect without FROM reducing sql/item_row.h: support of subselect without FROM reducing sql/item_strfunc.h: fixed layout support of subselect without FROM reducing sql/item_subselect.cc: support of subselect without FROM reducing sql/item_subselect.h: support of subselect without FROM reducing sql/mysql_priv.h: reference in Item_field::fix_field related changes sql/sql_base.cc: reference in Item_field::fix_field related changes sql/sql_derived.cc: fixed bug of calling setup_fields without correct lex->current_select pointer
This commit is contained in:
@@ -1654,6 +1654,7 @@ const Field *not_found_field= (Field*) 0x1;
|
||||
thd - pointer to current thread structure
|
||||
item - field item that should be found
|
||||
tables - tables for scaning
|
||||
where - table where field found will be returned via this parameter
|
||||
report_error - if FALSE then do not report error if item not found and
|
||||
return not_found_field;
|
||||
|
||||
@@ -1667,7 +1668,7 @@ const Field *not_found_field= (Field*) 0x1;
|
||||
|
||||
Field *
|
||||
find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
||||
bool report_error)
|
||||
TABLE_LIST **where, bool report_error)
|
||||
{
|
||||
Field *found=0;
|
||||
const char *db=item->db_name;
|
||||
@@ -1688,6 +1689,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
||||
grant_option && !thd->master_access,1);
|
||||
if (find)
|
||||
{
|
||||
(*where)= tables;
|
||||
if (find == WRONG_GRANT)
|
||||
return (Field*) 0;
|
||||
if (db || !thd->where)
|
||||
@@ -1742,6 +1744,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
||||
{
|
||||
if (field == WRONG_GRANT)
|
||||
return (Field*) 0;
|
||||
(*where)= tables;
|
||||
if (found)
|
||||
{
|
||||
if (!thd->where) // Returns first found
|
||||
|
||||
Reference in New Issue
Block a user