diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-23 10:44:55 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-07-23 10:44:55 +0200 |
commit | 97bfd559f190fa9daf9886909844c3e12cc192a1 (patch) | |
tree | 55020f807bf6610c2c8bfbf0637f54e11faeff0f /sql/sp.cc | |
parent | 92b9ca54228b750fd011ce83873a34aa187f7135 (diff) | |
download | mariadb-git-97bfd559f190fa9daf9886909844c3e12cc192a1.tar.gz |
Bug #55498 SHOW CREATE TRIGGER takes wrong type of metadata lock
The first problem was that SHOW CREATE TRIGGER took a stronger metadata
lock than required. This caused the statement to be blocked when it was
not needed. For example, LOCK TABLE WRITE in one connection would block
SHOW CREATE TRIGGER in another connection.
Another problem was that a SHOW CREATE TRIGGER statement issued inside
a transaction did not release its metadata locks at the end of the
statement execution. This happened even if SHOW CREATE TRIGGER is an
information statement. The consequence was that SHOW CREATE TRIGGER
was able to block other connections from accessing the table
(e.g. using ALTER TABLE).
This patch fixes the problem by changing SHOW CREATE TRIGGER to take
a MDL_SHARED_HIGH_PRIO metadata lock similar to what is already done
for SHOW CREATE TABLE. The patch also changes SHOW CREATE TRIGGER to
explicitly release any metadata locks taken by the statement after
it completes.
Test case added to show_check.test.
Diffstat (limited to 'sql/sp.cc')
0 files changed, 0 insertions, 0 deletions