summaryrefslogtreecommitdiff
path: root/server-tools
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-03-27 12:09:15 +0100
committerStaale Smedseng <staale.smedseng@sun.com>2009-03-27 12:09:15 +0100
commit50ed1ef7520bbff8a88ea33f7838544b1c3ce4e2 (patch)
tree84c57d9767fa6eff601423418e3702816b459723 /server-tools
parentc2c47b67fd6f6130b941a0b50fa701b0bb105ba7 (diff)
downloadmariadb-git-50ed1ef7520bbff8a88ea33f7838544b1c3ce4e2.tar.gz
Bug#39953 Triggers are not working properly with multi table
updates Attempt to execute trigger or stored function with multi-UPDATE which used - but didn't update - a table that was also used by the calling statement led to an error. Read-only reference to tables used in the calling statement should be allowed. This problem was caused by the fact that check for conflicting use of tables in SP/triggers was performed in open_tables(), and in case of multi-UPDATE we didn't know exact lock type at this stage. We solve the problem by moving this check to lock_tables(), so it can be performed after exact lock types for tables used by multi-UPDATE are determined. mysql-test/r/trigger.result: Results for the added test case is added. mysql-test/t/trigger.test: A new test case is added, verifying correct table multi-update conflict resolution, both read-only and write. sql/sql_base.cc: The check for conflicting use of tables in SP/triggers is moved to lock_tables(), to be performed after the exact lock types have been determined. Also, an assert is added to open_ltable() to ensure this func is not used in a prelocked context.
Diffstat (limited to 'server-tools')
0 files changed, 0 insertions, 0 deletions