Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Duplicate
-
8.0.26-18 (Q3 2021)
-
None
-
None
-
None
Description
How to repeat:
- Create a sandbox with dbdeployer.
$ dbdeployer deploy single mysql_8.0.17
- Create a schema and a table.
- I am using many CHAR fields fo generate a big dataset quickly.
$ ./use <<< "CREATE DATABASE test_jfg"
$ ./use test_jfg <<< "
CREATE TABLE test_jfg.t(id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY);
ALTER TABLE test_jfg.t ADD COLUMN v VARCHAR(255);"
$ for i in $(seq 9); do
./use test_jfg <<< "ALTER TABLE test_jfg.t ADD COLUMN c$i CHAR(255) DEFAULT ''"
done
- Generate ~2 GB of data in that table.
$ seq -f "INSERT INTO t(v) VALUES ('%f');" 1 1000000 | sed -e '1~1000s/^/COMMIT;BEGIN;/' | ./use test_jfg
- Contrarily to
Bug#96475
, I will run all next steps manually to show things are broken.
– In the mysql client, run FLUSH TABLE [...] FOR EXPORT.
mysql [localhost:8017] {msandbox} (test_jfg) > FLUSH TABLE t FOR EXPORT;
Query OK, 0 rows affected (0.00 sec)
- In bash, copy the files.
$ for s in cfg ibd; do cp data/test_jfg/t{,_}.$s; done
– In the . mysql client, UNLOCK TABLE and prepare import.
mysql [localhost:8017] {msandbox} (test_jfg) > UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)
mysql [localhost:8017] {msandbox} (test_jfg) > CREATE TABLE t2 LIKE t; ALTER TABLE t2 DISCARD TABLESPACE;
Query OK, 0 rows affected (0.04 sec)
Query OK, 0 rows affected (0.01 sec)
- In bash, copy the files.
$ for s in cfg ibd; do cp data/test_jfg/t{_,2}.$s; done
– In the mysql client, import the table.
mysql [localhost:8017] {msandbox} (test_jfg) > ALTER TABLE t2 IMPORT TABLESPACE;
ERROR 1817 (HY000): Index corrupt: Clustered index validation failed, due to data file corruption.
– In above, we can see that things fail, but I would expect them to succeed.
Attachments
Issue Links
- is duplicated by
-
PXB-2543 Add IB_EXPORT_CFG_VERSION_V6 for exporting cfg file for a table
-
- Done
-