diff options
author | igor@rurik.mysql.com <> | 2003-12-11 14:55:48 -0800 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2003-12-11 14:55:48 -0800 |
commit | 54628879fcf511954669d1ee532f639f1f98db47 (patch) | |
tree | 27bbc53533e288c5402000d6358fe6b91ed1eb32 /sql/sql_update.cc | |
parent | 64d7e0162cf90cf49fd0a0346c6119a32e272b0c (diff) | |
download | mariadb-git-54628879fcf511954669d1ee532f639f1f98db47.tar.gz |
Many files:
Fixed a bug causing a crash for multi-update/multi-delete
with impossible where (bug #1860).
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index d5034644830..19df0661db3 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -440,7 +440,7 @@ multi_update::multi_update(THD *thd_arg, TABLE_LIST *table_list, :all_tables(table_list), update_tables(0), thd(thd_arg), tmp_tables(0), updated(0), found(0), fields(field_list), values(value_list), table_count(0), copy_field(0), handle_duplicates(handle_duplicates_arg), - do_update(1), trans_safe(0) + do_update(1), trans_safe(0), tmp_tables_inited(0) {} @@ -622,6 +622,7 @@ multi_update::initialize_tables(JOIN *join) DBUG_RETURN(1); tmp_tables[cnt]->file->extra(HA_EXTRA_WRITE_CACHE); } + tmp_tables_inited= 1; DBUG_RETURN(0); } @@ -819,8 +820,11 @@ int multi_update::do_updates(bool from_send_error) ha_rows org_updated; TABLE *table; DBUG_ENTER("do_updates"); + - do_update= 0; // Don't retry this function + do_update= 0; // Don't retry this function + if (!tmp_tables_inited) + DBUG_RETURN(0); for (cur_table= update_tables; cur_table ; cur_table= cur_table->next) { table = cur_table->table; |