diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-04-14 09:40:45 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-04-14 09:40:45 +0200 |
commit | d3d459a72c8a1b2f972560a77e2296db14df4a84 (patch) | |
tree | c23076aa2511cb1692c243db90eb44166840dad6 /mysql-test/r/key.result | |
parent | 3ff33e5dc582a2966cd6d337fb18a78c1ae0aabc (diff) | |
download | mariadb-git-d3d459a72c8a1b2f972560a77e2296db14df4a84.tar.gz |
Bug #52593 SHOW CREATE TABLE is blocked if table is locked
for write by another connection
The problem was that if a table was locked in one connection by
LOCK TABLES ... WRITE, REPAIR TABLE or OPTIMIZE TABLE, SHOW CREATE
TABLE from another connection would be blocked. As SHOW CREATE TABLE
only reads metadata about the table, such blocking is not needed.
The problem was that when SHOW CREATE TABLE tried to get a metadata
lock on the table in order to open it, it used the wrong type of
metadata lock request. It used MDL_SHARED_READ which is used when
the intent is to read both table metadata and table data. Instead
it should have used MDL_SHARED_HIGH_PRIO which signifies an intent
to only read metadata.
This patch fixes the problem by making sure SHOW CREATE TABLE uses
the MDL_SHARED_HIGH_PRIO metadata lock request type when trying to
open the table. The patch also fixes a similar problem with the
mysql_list_fields API call.
Test case added to show_check.test.
Diffstat (limited to 'mysql-test/r/key.result')
0 files changed, 0 insertions, 0 deletions