summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-03-07 13:21:02 +0100
committerSergei Golubchik <serg@mariadb.org>2015-03-07 13:21:02 +0100
commit2db62f686e148f09fe5fd0b385fc71f2a3c4a133 (patch)
treecf1d5d6f0d05f1b50be96d943476173228cbd458 /sql/sql_delete.cc
parent143f5d9172647a43cdcf5c27b8a78f32c9f639c0 (diff)
parentd61573d3e5c8f9d85b88f9fa2e79160b159bf67d (diff)
downloadmariadb-git-2db62f686e148f09fe5fd0b385fc71f2a3c4a133.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index e16aade6bcb..8fd9b0b2ada 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -922,9 +922,10 @@ multi_delete::initialize_tables(JOIN *join)
delete_while_scanning= 1;
for (walk= delete_tables; walk; walk= walk->next_local)
{
- tables_to_delete_from|= walk->table->map;
+ TABLE_LIST *tbl= walk->correspondent_table->find_table_for_update();
+ tables_to_delete_from|= tbl->table->map;
if (delete_while_scanning &&
- unique_table(thd, walk, join->tables_list, false))
+ unique_table(thd, tbl, join->tables_list, false))
{
/*
If the table we are going to delete from appears