diff options
author | bell@sanja.is.com.ua <> | 2003-01-25 02:25:52 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2003-01-25 02:25:52 +0200 |
commit | d56e23f64e131c979f13965e65662ea76886c935 (patch) | |
tree | 043b4b5b889f0d8173b87b17f3de8dc3fbbb1dd2 /sql/sql_prepare.cc | |
parent | 710881e4fbc3a4586507bbf1eb3a85a7adfe0048 (diff) | |
download | mariadb-git-d56e23f64e131c979f13965e65662ea76886c935.tar.gz |
fixed subselects with temporary tables (SCRUM)
fixed memory leacks
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 16 |
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); |