1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #11784056 ENABLE CONCURRENT READS WHILE CREATING

NON-PRIMARY UNIQUE INDEX USING INNODB

This patch adds the HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE
capability flag to InnoDB, indicating that concurrent reads
can be allowed while non-primary unique indexes are created.

This is an follow-up to Bug #11751388 which enabled concurrent
reads when creating non-primary non-unique indexes.

Test case added to innodb_mysql_sync.test.
This commit is contained in:
Jon Olav Hauglid
2011-03-07 14:30:49 +01:00
parent c2dc4b022a
commit c171d99ded
3 changed files with 23 additions and 15 deletions

View File

@ -253,26 +253,23 @@ connection con1;
--reap
--echo # Test 4: Secondary unique index, should not block reads.
# This requires HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE to be supported
# by InnoDB. Adding this flag currently introduces a regression so
# this test is disabled until the regression has been fixed.
--echo # Connection default
connection default;
#SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
#--echo # Sending:
#--send ALTER TABLE t1 ADD UNIQUE (b)
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
--echo # Sending:
--send ALTER TABLE t1 ADD UNIQUE (b)
#--echo # Connection con1
#connection con1;
#SET DEBUG_SYNC= "now WAIT_FOR manage";
#SELECT * FROM t1;
#SET DEBUG_SYNC= "now SIGNAL query";
--echo # Connection con1
connection con1;
SET DEBUG_SYNC= "now WAIT_FOR manage";
SELECT * FROM t1;
SET DEBUG_SYNC= "now SIGNAL query";
#--echo # Connection default
#connection default;
#--echo # Reaping: ALTER TABLE t1 ADD UNIQUE (b)
#--reap
--echo # Connection default
connection default;
--echo # Reaping: ALTER TABLE t1 ADD UNIQUE (b)
--reap
disconnect con1;
disconnect con2;