diff options
author | unknown <bell@sanja.is.com.ua> | 2003-01-25 02:25:52 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-01-25 02:25:52 +0200 |
commit | b23541339c389e452b3d643c249afd4e7fb4899f (patch) | |
tree | 043b4b5b889f0d8173b87b17f3de8dc3fbbb1dd2 /sql/sql_delete.cc | |
parent | 3b33f0c2c14c9e210b81d8ee784c75f83ce99636 (diff) | |
download | mariadb-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_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 88da3e2505c..bb1eb1e1dd2 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -92,6 +92,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if ((select && select->check_quick(safe_update, limit)) || !limit) { delete select; + free_ulderlayed_joins(thd, &thd->lex.select_lex); send_ok(thd,0L); DBUG_RETURN(0); // Nothing to delete } @@ -103,6 +104,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if (safe_update && !using_limit) { delete select; + free_ulderlayed_joins(thd, &thd->lex.select_lex); send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); DBUG_RETURN(1); } @@ -124,7 +126,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, table->io_cache = (IO_CACHE *) my_malloc(sizeof(IO_CACHE), MYF(MY_FAE | MY_ZEROFILL)); - if (setup_order(thd, &tables, fields, all_fields, order) || + if (setup_order(thd, 0, &tables, fields, all_fields, order) || !(sortorder=make_unireg_sortorder(order, &length)) || (table->found_records = filesort(thd, table, sortorder, length, (SQL_SELECT *) 0, HA_POS_ERROR, @@ -132,6 +134,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, == HA_POS_ERROR) { delete select; + free_ulderlayed_joins(thd, &thd->lex.select_lex); DBUG_RETURN(-1); // This will force out message } } @@ -207,6 +210,7 @@ cleanup: thd->lock=0; } delete select; + free_ulderlayed_joins(thd, &thd->lex.select_lex); if (error >= 0 || thd->net.report_error) send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN: 0); else |