summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 6b14c4f3fcc..b056b13bca3 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -2471,6 +2471,8 @@ int multi_update::do_updates()
table = cur_table->table;
if (table == table_to_update)
continue; // Already updated
+ if (table->file->pushed_rowid_filter)
+ table->file->disable_pushed_rowid_filter();
org_updated= updated;
tmp_table= tmp_tables[cur_table->shared];
tmp_table->file->extra(HA_EXTRA_CACHE); // Change to read cache
@@ -2665,7 +2667,8 @@ int multi_update::do_updates()
check_opt_it.rewind();
while (TABLE *tbl= check_opt_it++)
tbl->file->ha_rnd_end();
-
+ if (table->file->save_pushed_rowid_filter)
+ table->file->enable_pushed_rowid_filter();
}
DBUG_RETURN(0);
@@ -2676,6 +2679,8 @@ err:
}
err2:
+ if (table->file->save_pushed_rowid_filter)
+ table->file->enable_pushed_rowid_filter();
if (table->file->inited)
(void) table->file->ha_rnd_end();
if (tmp_table->file->inited)
@@ -2955,7 +2960,9 @@ bool Sql_cmd_update::prepare_inner(THD *thd)
{
goto err;
}
-
+ if (!multitable &&
+ select_lex->sj_subselects.elements)
+ multitable= true;
}
if (table_list->has_period())