mirror of
https://github.com/MariaDB/server.git
synced 2025-09-08 06:27:57 +03:00
PageConverter::adjust_cluster_record(): Instead of writing
the invalid value DB_ROLL_PTR=0, write a value that indicates
a fresh insert, that is, prevents the DB_ROLL_PTR from being
dereferenced in any circumstances.
It can be argued that IMPORT TABLESPACE should actually
update the dict_index_t::trx_id to prevent older transactions
from accessing the table, similar to what I did on table
rebuild in MySQL 5.6.6 in
03f81a55f2
27 lines
725 B
Plaintext
27 lines
725 B
Plaintext
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;
|
|
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
|
|
SELECT * FROM t1;
|
|
ERROR HY000: Table definition has changed, please retry transaction
|
|
COMMIT;
|
|
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
# 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;
|