diff options
author | dlenev@brandersnatch.localdomain <> | 2005-06-09 01:07:52 +0400 |
---|---|---|
committer | dlenev@brandersnatch.localdomain <> | 2005-06-09 01:07:52 +0400 |
commit | 5394a1a4bddc7fad8d8d490c5d1a902152916a2f (patch) | |
tree | 5f8aa229b96ac3ed689847d17b87a35fd44cff21 /sql/sql_prepare.cc | |
parent | 620d42318bc8235342c502263e031d4a714f1c79 (diff) | |
download | mariadb-git-5394a1a4bddc7fad8d8d490c5d1a902152916a2f.tar.gz |
Fix for bug #11158 "Can't perform multi-delete in stored procedure".
In order to make multi-delete SP friendly we need to have all table
locks for the elements of main statement table list properly set
at the end of parsing.
Also performed small cleanup: We don't need relink_tables_for_multidelete()
any longer since the only case now when TABLE_LIST::correspondent_table
is non-zero are tables in auxilary table list of multi-delete and these
tables are handled specially in mysql_multi_delete_prepare().
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 1521b206e0d..759bf45da26 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1448,8 +1448,7 @@ static int mysql_test_multidelete(Prepared_statement *stmt, if (add_item_to_list(stmt->thd, new Item_null())) return -1; - uint fake_counter; - if ((res= multi_delete_precheck(stmt->thd, tables, &fake_counter))) + if ((res= multi_delete_precheck(stmt->thd, tables))) return res; if ((res= select_like_stmt_test_with_open_n_lock(stmt, tables, &mysql_multi_delete_prepare, |