Debian Codegraph @

mysql-test/suite/innodb/t/import_empty_instant_default.test

raw
1 #
2 # Bug#31191361 - TTS RESTORE FAILURE WITH ERROR 1810 (HY000):
3 # IO READ ERROR: (140055463421456, (NULL))
4 # IO READ ERROR: (140055463421456, (NULL))
5 #
6
7 # Must be 1 for this to work.
8 SELECT @@innodb_file_per_table;
9
10 let $MYSQLD_DATADIR = `SELECT @@datadir`;
11
12 CREATE TABLE t (id INT PRIMARY KEY);
13 # The column must be added by the INSTANT algorithm, and must be VARCHAR
14 # (not CHAR), so that the default value is ineed 0 length.
15 # @see doxygen comment for instant_default:
16 # /** Default value when this column was added instantly.
17 # If this is not a instantly added column then this is nullptr. */
18 ALTER TABLE t ADD COLUMN (val varchar(2) NOT NULL DEFAULT ''),
19 ALGORITHM = INSTANT;
20
21 FLUSH TABLES test.t FOR EXPORT;
22 # Backup
23 --copy_file $MYSQLD_DATADIR/test/t.cfg $MYSQLD_DATADIR/test/t.cfg_back
24 --copy_file $MYSQLD_DATADIR/test/t.ibd $MYSQLD_DATADIR/test/t.ibd_back
25 UNLOCK TABLES;
26
27 # Remove the tablespace and its files.
28 ALTER TABLE test.t DISCARD TABLESPACE;
29
30 # Restore
31 --move_file $MYSQLD_DATADIR/test/t.cfg_back $MYSQLD_DATADIR/test/t.cfg
32 --move_file $MYSQLD_DATADIR/test/t.ibd_back $MYSQLD_DATADIR/test/t.ibd
33
34 # This is the place, where the bug showed up.
35 ALTER TABLE test.t IMPORT TABLESPACE;
36
37 DROP TABLE t;