Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5
-
None
Description
It may have to be documented as a limitation, which will be a pity: first, system_versioning_alter_history is specifically recommended for adding new columns to the table, and secondly, apparently real-life users employ DISCARD/IMPORT TABLESPACE for the purpose of backing/restoring or moving data in system-versioned tables, due to the lack of functionality in mysqldump.
--source include/have_innodb.inc
|
|
--let $datadir= `select @@datadir`
|
|
SET system_versioning_alter_history= KEEP; |
CREATE TABLE t1 (a INT) ENGINE=InnoDB WITH SYSTEM VERSIONING; |
ALTER TABLE t1 ADD b INT; |
FLUSH TABLES t1 FOR EXPORT; |
--copy_file $datadir/test/t1.cfg $MYSQLTEST_VARDIR/t1.cfg
|
--copy_file $datadir/test/t1.ibd $MYSQLTEST_VARDIR/t1.ibd
|
UNLOCK TABLES;
|
|
DROP TABLE t1; |
CREATE TABLE `t1` ( |
`a` int(11) DEFAULT NULL, |
`b` int(11) DEFAULT NULL |
) ENGINE=InnoDB WITH SYSTEM VERSIONING; |
|
ALTER TABLE t1 DISCARD TABLESPACE; |
--copy_file $MYSQLTEST_VARDIR/t1.cfg $datadir/test/t1.cfg
|
--copy_file $MYSQLTEST_VARDIR/t1.ibd $datadir/test/t1.ibd
|
ALTER TABLE t1 IMPORT TABLESPACE; |
|
# Cleanup
|
DROP TABLE t1; |
10.3 e59c1cef |
query 'ALTER TABLE t1 IMPORT TABLESPACE' failed: 1808: Schema mismatch (Column b ordinal value mismatch, it's at 1 in the table and 3 in the tablespace meta-data file) |
Attachments
Issue Links
- relates to
-
MDEV-24352 General error: 1808 Schema mismatch (Index field count XX doesn't match tablespace metadata file value YY)
- Closed