-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
115 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
CREATE TABLE t1 (a INT, b VARCHAR(10)) ENGINE=InnoDB | ||
PARTITION BY RANGE(a) | ||
(PARTITION pa VALUES LESS THAN (3), | ||
PARTITION pb VALUES LESS THAN (5)); | ||
INSERT INTO t1 VALUES(2,'two'),(2,'two'),(4,'four'); | ||
connect ddl,localhost,root,,test; | ||
SET DEBUG_SYNC = 'inplace_after_index_build SIGNAL go WAIT_FOR done'; | ||
ALTER TABLE t1 ADD UNIQUE KEY (a,b(3)); | ||
connection default; | ||
SET DEBUG_SYNC = 'now WAIT_FOR go'; | ||
BEGIN; | ||
SELECT * FROM t1 FOR UPDATE; | ||
a b | ||
2 two | ||
2 two | ||
4 four | ||
SET DEBUG_SYNC = 'now SIGNAL done'; | ||
connection ddl; | ||
ERROR 23000: Duplicate entry '2-two' for key 'a' | ||
connection default; | ||
DELETE FROM t1; | ||
disconnect ddl; | ||
SET DEBUG_SYNC = 'RESET'; | ||
CHECK TABLE t1; | ||
Table Op Msg_type Msg_text | ||
test.t1 check status OK | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--source include/have_innodb.inc | ||
--source include/have_partition.inc | ||
--source include/have_debug.inc | ||
--source include/have_debug_sync.inc | ||
|
||
CREATE TABLE t1 (a INT, b VARCHAR(10)) ENGINE=InnoDB | ||
PARTITION BY RANGE(a) | ||
(PARTITION pa VALUES LESS THAN (3), | ||
PARTITION pb VALUES LESS THAN (5)); | ||
|
||
INSERT INTO t1 VALUES(2,'two'),(2,'two'),(4,'four'); | ||
|
||
connect ddl,localhost,root,,test; | ||
SET DEBUG_SYNC = 'inplace_after_index_build SIGNAL go WAIT_FOR done'; | ||
send ALTER TABLE t1 ADD UNIQUE KEY (a,b(3)); | ||
|
||
connection default; | ||
SET DEBUG_SYNC = 'now WAIT_FOR go'; | ||
BEGIN; | ||
SELECT * FROM t1 FOR UPDATE; | ||
SET DEBUG_SYNC = 'now SIGNAL done'; | ||
|
||
connection ddl; | ||
--error ER_DUP_ENTRY | ||
reap; | ||
|
||
connection default; | ||
DELETE FROM t1; | ||
disconnect ddl; | ||
|
||
SET DEBUG_SYNC = 'RESET'; | ||
|
||
CHECK TABLE t1; | ||
DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.