-
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
21 changed files
with
176 additions
and
48 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
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,31 @@ | ||
SET @save_per_table= @@GLOBAL.innodb_file_per_table; | ||
SET GLOBAL innodb_file_per_table= 1; | ||
# | ||
# MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE | ||
# | ||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES(0); | ||
FLUSH TABLES t1 WITH READ LOCK; | ||
UNLOCK TABLES; | ||
START TRANSACTION WITH CONSISTENT SNAPSHOT; | ||
connect con1,localhost,root,,; | ||
ALTER TABLE t1 FORCE, ALGORITHM=COPY; | ||
connection default; | ||
SELECT * FROM t1; | ||
ERROR HY000: Table definition has changed, please retry transaction | ||
COMMIT; | ||
START TRANSACTION WITH CONSISTENT SNAPSHOT; | ||
connection con1; | ||
ALTER TABLE t1 DISCARD TABLESPACE; | ||
ALTER TABLE t1 IMPORT TABLESPACE; | ||
disconnect con1; | ||
connection default; | ||
# FIXME: Block this with ER_TABLE_DEF_CHANGED | ||
SELECT * FROM t1; | ||
a | ||
COMMIT; | ||
SELECT * FROM t1; | ||
a | ||
0 | ||
DROP TABLE t1; | ||
SET GLOBAL innodb_file_per_table= @save_per_table; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--source include/have_innodb.inc | ||
|
||
SET @save_per_table= @@GLOBAL.innodb_file_per_table; | ||
SET GLOBAL innodb_file_per_table= 1; | ||
|
||
let MYSQLD_DATADIR =`SELECT @@datadir`; | ||
|
||
--echo # | ||
--echo # MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE | ||
--echo # | ||
|
||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; | ||
INSERT INTO t1 VALUES(0); | ||
FLUSH TABLES t1 WITH READ LOCK; | ||
perl; | ||
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; | ||
ib_backup_tablespace("test", "t1"); | ||
EOF | ||
UNLOCK TABLES; | ||
|
||
START TRANSACTION WITH CONSISTENT SNAPSHOT; | ||
|
||
connect (con1,localhost,root,,); | ||
ALTER TABLE t1 FORCE, ALGORITHM=COPY; | ||
|
||
connection default; | ||
--error ER_TABLE_DEF_CHANGED | ||
SELECT * FROM t1; | ||
COMMIT; | ||
START TRANSACTION WITH CONSISTENT SNAPSHOT; | ||
|
||
connection con1; | ||
|
||
ALTER TABLE t1 DISCARD TABLESPACE; | ||
|
||
perl; | ||
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; | ||
ib_restore_tablespace("test", "t1"); | ||
EOF | ||
|
||
ALTER TABLE t1 IMPORT TABLESPACE; | ||
disconnect con1; | ||
|
||
connection default; | ||
--echo # FIXME: Block this with ER_TABLE_DEF_CHANGED | ||
SELECT * FROM t1; | ||
COMMIT; | ||
SELECT * FROM t1; | ||
|
||
DROP TABLE t1; | ||
|
||
SET GLOBAL innodb_file_per_table= @save_per_table; |
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.