diff options
author | unknown <igor@rurik.mysql.com> | 2003-12-12 13:14:59 -0800 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2003-12-12 13:14:59 -0800 |
commit | 0a79eedb5d6dfb24640b49288b9fdb003c6b00b2 (patch) | |
tree | c73f2fa42aee245f5de9dbf9b9628c76fa1cc4db /sql/sql_delete.cc | |
parent | b196f0305527a393781601c0f9e5669375b584c5 (diff) | |
download | mariadb-git-0a79eedb5d6dfb24640b49288b9fdb003c6b00b2.tar.gz |
sql_delete.cc, sql_update.cc, sql_class.h:
Simplification of the previous fix for multi-update/delete.
sql/sql_class.h:
Simplification of the previous fix for multi-update/delete.
sql/sql_update.cc:
Simplification of the previous fix for multi-update/delete.
sql/sql_delete.cc:
Simplification of the previous fix for multi-update/delete.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 399f237bf2f..bdf2cf85749 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -234,10 +234,9 @@ extern "C" int refposcmp2(void* arg, const void *a,const void *b) multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt, uint num_of_tables_arg) - : delete_tables(dt), thd(thd_arg), deleted(0), + : delete_tables(dt), thd(thd_arg), deleted(0), found(0), num_of_tables(num_of_tables_arg), error(0), - do_delete(0), transactional_tables(0), log_delayed(0), normal_tables(0), - tempfiles_inited(0) + do_delete(0), transactional_tables(0), log_delayed(0), normal_tables(0) { tempfiles = (Unique **) sql_calloc(sizeof(Unique *) * (num_of_tables-1)); } @@ -298,7 +297,6 @@ multi_delete::initialize_tables(JOIN *join) table->file->ref_length, MEM_STRIP_BUF_SIZE); } - tempfiles_inited= 1; init_ftfuncs(thd,1); DBUG_RETURN(thd->fatal_error != 0); } @@ -339,6 +337,7 @@ bool multi_delete::send_data(List<Item> &values) continue; table->file->position(table->record[0]); + found++; if (secure_counter < 0) { @@ -414,7 +413,7 @@ int multi_delete::do_deletes(bool from_send_error) if (from_send_error) { - /* Found out table number for 'table_being_deleted' */ + /* Found out table number for 'table_being_deleted*/ for (TABLE_LIST *aux=delete_tables; aux != table_being_deleted; aux=aux->next) @@ -424,7 +423,7 @@ int multi_delete::do_deletes(bool from_send_error) table_being_deleted = delete_tables; do_delete= 0; - if (!tempfiles_inited) + if (!found) DBUG_RETURN(0); for (table_being_deleted=table_being_deleted->next; table_being_deleted ; |