1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug #9486 "Can't perform multi-update in stored procedure".

New more SP-locking friendly approach to handling locks in multi-update.
Now we mark all tables of multi-update as needing write lock at parsing
stage and if possible downgrade lock at execution stage (For its work
SP-locking mechanism needs to know all lock types right after parsing
stage).
This commit is contained in:
dlenev@brandersnatch.localdomain
2005-04-15 20:31:47 +04:00
parent 32221d9b9e
commit 6b0b4734d9
7 changed files with 73 additions and 25 deletions

View File

@@ -1012,11 +1012,6 @@ static int mysql_test_update(Prepared_statement *stmt,
DBUG_PRINT("info", ("Switch to multi-update"));
/* pass counter value */
thd->lex->table_count= table_count;
/*
give correct value to multi_lock_option, because it will be used
in multiupdate
*/
thd->lex->multi_lock_option= table_list->lock_type;
/* convert to multiupdate */
return 2;
}