Bug #27234 | INSERT into Merge Table implicitly locks all underlying tables | ||
---|---|---|---|
Submitted: | 17 Mar 2007 4:48 | Modified: | 21 Mar 2007 8:56 |
Reporter: | Venu Anuganti | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Merge storage engine | Severity: | S4 (Feature request) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any | |
Tags: | bfsm_2007_04_05, lock, merge, read, write |
[17 Mar 2007 4:48]
Venu Anuganti
[17 Mar 2007 5:04]
Venu Anuganti
script to populate table data for update
Attachment: merge.sql (application/octet-stream, text), 187.15 KiB.
[20 Mar 2007 17:57]
Todd Farmer
Verified on 4.1.22, 5.0.37 and 5.1.16-beta. Used following script: - In first session -- CREATE DATABASE IF NOT EXISTS bug27234; USE bug27234; DROP TABLE IF EXISTS m; DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; CREATE TABLE t1 (c1 INT) ENGINE = MyISAM; CREATE TABLE t2 (c1 INT) ENGINE = MyISAM; CREATE TABLE m (c1 INT) ENGINE = MERGE UNION(t1, t2) INSERT_METHOD = LAST; LOCK TABLE t1 READ; -- In second session -- USE bug27234; INSERT INTO m VALUES (1); # Will hang waiting for lock on t1, even though data is inserted to t2 -- Back in first session -- UNLOCK TABLES; # Allows insert in second session to complete SELECT * FROM t2; # Verifies that data was added to t2 and not t1