mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
fixed subselects with temporary tables (SCRUM)
fixed memory leacks mysql-test/r/subselect.result: some changes in subselect tests mysql-test/t/subselect.test: some changes in subselect tests sql/item.cc: some item made copyable methods for creating copy of item list tmp_table_field() splited sql/item.h: some item made copyable methods for creating copy of item list tmp_table_field() splited sql/item_cmpfunc.cc: changed references creation sql/item_cmpfunc.h: changed references creation sql/item_func.cc: some item made copyable methods for creating copy of item list changed references creation sql/item_func.h: some item made copyable methods for creating copy of item list changed references creation tmp_table_field() splited sql/item_subselect.cc: changed references creation sql/item_sum.cc: some item made copyable methods for creating copy of item list sql/item_sum.h: some item made copyable methods for creating copy of item list sql/item_timefunc.h: tmp_table_field() splited sql/item_uniq.h: some item made copyable methods for creating copy of item list sql/mysql_priv.h: fixed subselects with temporary tables sql/sql_base.cc: fixed subselects with temporary tables sql/sql_class.h: fixed subselects with temporary tables sql/sql_delete.cc: fixed subselects with temporary tables sql/sql_derived.cc: fixed subselects with temporary tables sql/sql_do.cc: fixed subselects with temporary tables sql/sql_insert.cc: fixed subselects with temporary tables sql/sql_lex.cc: fixed subselects with temporary tables sql/sql_lex.h: fixed subselects with temporary tables sql/sql_list.h: fixed subselects with temporary tables sql/sql_load.cc: fixed subselects with temporary tables sql/sql_olap.cc: fixed subselects with temporary tables sql/sql_parse.cc: fixed subselects with temporary tables sql/sql_prepare.cc: fixed subselects with temporary tables sql/sql_select.cc: fixed subselects with temporary tables sql/sql_select.h: fixed subselects with temporary tables sql/sql_table.cc: fixed subselects with temporary tables sql/sql_union.cc: fixed subselects with temporary tables sql/sql_update.cc: fixed subselects with temporary tables sql/sql_yacc.yy: fixed subselects with temporary tables
This commit is contained in:
@@ -1915,6 +1915,7 @@ mysql_execute_command(THD *thd)
|
||||
&lex->create_info,
|
||||
tables, lex->create_list,
|
||||
lex->key_list, lex->drop_list, lex->alter_list,
|
||||
select_lex->order_list.elements,
|
||||
(ORDER *) select_lex->order_list.first,
|
||||
lex->drop_primary, lex->duplicates,
|
||||
lex->alter_keys_onoff, lex->simple_alter);
|
||||
@@ -2026,8 +2027,8 @@ mysql_execute_command(THD *thd)
|
||||
res= mysql_alter_table(thd, NullS, NullS, &create_info,
|
||||
tables, lex->create_list,
|
||||
lex->key_list, lex->drop_list, lex->alter_list,
|
||||
(ORDER *) 0,
|
||||
0,DUP_ERROR);
|
||||
0, (ORDER *) 0,
|
||||
0, DUP_ERROR);
|
||||
}
|
||||
else
|
||||
res = mysql_optimize_table(thd, tables, &lex->check_opt);
|
||||
@@ -2047,6 +2048,7 @@ mysql_execute_command(THD *thd)
|
||||
select_lex->item_list,
|
||||
lex->value_list,
|
||||
select_lex->where,
|
||||
select_lex->order_list.elements,
|
||||
(ORDER *) select_lex->order_list.first,
|
||||
select_lex->select_limit,
|
||||
lex->duplicates);
|
||||
@@ -2246,10 +2248,12 @@ mysql_execute_command(THD *thd)
|
||||
if (!thd->fatal_error && (result= new multi_delete(thd,aux_tables,
|
||||
table_count)))
|
||||
{
|
||||
res= mysql_select(thd,select_lex->get_table_list(),
|
||||
res= mysql_select(thd, &select_lex->ref_pointer_array,
|
||||
select_lex->get_table_list(),
|
||||
select_lex->with_wild,
|
||||
select_lex->item_list,
|
||||
select_lex->where,
|
||||
(ORDER *)NULL,(ORDER *)NULL,(Item *)NULL,
|
||||
0, (ORDER *)NULL, (ORDER *)NULL, (Item *)NULL,
|
||||
(ORDER *)NULL,
|
||||
select_lex->options | thd->options |
|
||||
SELECT_NO_JOIN_CACHE,
|
||||
@@ -2741,6 +2745,7 @@ mysql_execute_command(THD *thd)
|
||||
send_ok(thd);
|
||||
break;
|
||||
}
|
||||
thd->free_tmp_tables();
|
||||
thd->proc_info="query end"; // QQ
|
||||
if (res < 0)
|
||||
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0);
|
||||
@@ -2988,6 +2993,7 @@ mysql_init_query(THD *thd)
|
||||
LEX *lex=&thd->lex;
|
||||
lex->unit.init_query();
|
||||
lex->unit.init_select();
|
||||
lex->unit.thd= thd;
|
||||
lex->select_lex.init_query();
|
||||
lex->value_list.empty();
|
||||
lex->param_list.empty();
|
||||
@@ -3044,6 +3050,7 @@ mysql_new_select(LEX *lex, bool move_down)
|
||||
return 1;
|
||||
unit->init_query();
|
||||
unit->init_select();
|
||||
unit->thd= lex->thd;
|
||||
unit->include_down(lex->current_select);
|
||||
select_lex->include_down(unit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user