summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-25 02:25:52 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-25 02:25:52 +0200
commitb23541339c389e452b3d643c249afd4e7fb4899f (patch)
tree043b4b5b889f0d8173b87b17f3de8dc3fbbb1dd2 /sql/sql_prepare.cc
parent3b33f0c2c14c9e210b81d8ee784c75f83ce99636 (diff)
downloadmariadb-git-b23541339c389e452b3d643c249afd4e7fb4899f.tar.gz
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
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 9d6e6d75ade..6af2528074c 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -365,7 +365,7 @@ static int check_prepare_fields(THD *thd,TABLE *table, List<Item> &fields,
thd->dupp_field=0;
if (setup_tables(&table_list) ||
- setup_fields(thd,&table_list,fields,1,0,0))
+ setup_fields(thd, 0, &table_list, fields, 1, 0, 0))
return -1;
if (thd->dupp_field)
{
@@ -446,8 +446,9 @@ static bool mysql_test_upd_fields(PREP_STMT *stmt, TABLE_LIST *table_list,
if (!(table = open_ltable(thd,table_list,table_list->lock_type)))
DBUG_RETURN(1);
- if (setup_tables(table_list) || setup_fields(thd,table_list,fields,1,0,0) ||
- setup_conds(thd,table_list,&conds))
+ if (setup_tables(table_list) ||
+ setup_fields(thd, 0, table_list, fields, 1, 0, 0) ||
+ setup_conds(thd, table_list, &conds))
DBUG_RETURN(1);
/*
@@ -488,10 +489,11 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
thd->used_tables=0; // Updated by setup_fields
if (setup_tables(tables) ||
- setup_fields(thd,tables,fields,1,&all_fields,1) ||
+ setup_fields(thd, 0, tables,fields,1,&all_fields,1) ||
setup_conds(thd,tables,&conds) ||
- setup_order(thd,tables,fields,all_fields,order) ||
- setup_group(thd,tables,fields,all_fields,group,&hidden_group_fields))
+ setup_order(thd, 0, tables, fields, all_fields, order) ||
+ setup_group(thd, 0, tables, fields, all_fields, group,
+ &hidden_group_fields))
DBUG_RETURN(1);
if (having)
@@ -502,7 +504,7 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
|| thd->fatal_error)
DBUG_RETURN(1);
if (having->with_sum_func)
- having->split_sum_func(all_fields);
+ having->split_sum_func(0, all_fields);
}
if (setup_ftfuncs(&thd->lex.select_lex))
DBUG_RETURN(1);