File: import_bugs.result

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (104 lines) | stat: -rw-r--r-- 3,495 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
call mtr.add_suppression("Index for table 'imp_t1' is corrupt; try to repair it");
SET @save_innodb_checksum_algorithm=@@GLOBAL.innodb_checksum_algorithm;
SET GLOBAL innodb_checksum_algorithm=full_crc32;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
ALTER TABLE imp_t1 DISCARD TABLESPACE ;
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
ALTER TABLE imp_t1 IMPORT TABLESPACE;
ERROR HY000: Schema mismatch (ROW_FORMAT mismatch)
CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
ERROR 42S01: Table 'imp_t1' already exists
DROP TABLE imp_t1;
CREATE TABLE imp_t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
DROP TABLE imp_t1, t1;
SET GLOBAL innodb_checksum_algorithm=@save_innodb_checksum_algorithm;
#
# MDEV-33400 Adaptive hash index corruption after DISCARD TABLESPACE
#
SET @save_adaptive=@@GLOBAL.innodb_adaptive_hash_index;
SET GLOBAL innodb_adaptive_hash_index=ON;
CREATE TABLE t (a INT PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t SELECT * FROM seq_1_to_131;
ALTER TABLE t ADD hid INT DEFAULT 2;
INSERT INTO t VALUES (251,1);
ALTER TABLE t DISCARD TABLESPACE;
CHECK TABLE mysql.innodb_table_stats;
Table	Op	Msg_type	Msg_text
mysql.innodb_table_stats	check	status	OK
DROP TABLE t;
SET GLOBAL innodb_adaptive_hash_index=@save_adaptive;
# End of 10.4 tests
#
# MDEV-18288: Transportable Tablespaces leave AUTO_INCREMENT in mismatched
# state, causing INSERT errors in newly imported tables when .cfg is not used.
#
CREATE TABLE t1(
id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY (id)
) ENGINE=INNODB;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 DISCARD TABLESPACE;
INSERT INTO t1() VALUES();
INSERT INTO t1() VALUES();
FLUSH TABLES test.t1 FOR EXPORT;
# Copy data file
# Skip CFG file copy
UNLOCK TABLES;
DROP TABLE t1;
ALTER TABLE t2 IMPORT TABLESPACE;
Warnings:
Warning	1810	IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
SELECT * FROM t2 ORDER BY id;
id
1
2
INSERT INTO t2() VALUES();
INSERT INTO t2() VALUES();
INSERT INTO t2() VALUES();
SELECT * FROM t2 ORDER BY id;
id
1
2
3
4
5
DROP TABLE t2;
#
# MDEV-34181  Instant table aborts after discard tablespace
#
CREATE TABLE t1(c3 INT, c2 INT, c1 INT KEY)ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, 1, 1), (2, 2, 2);
CREATE TABLE t2 (c1 INT KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES(1);
ALTER TABLE t2 ADD c2 INT;
FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
ALTER TABLE t2 DISCARD TABLESPACE;
ALTER TABLE t2 ADD c3 INT FIRST;
Warnings:
Warning	1814	Tablespace has been discarded for table `t2`
ALTER TABLE t2 IMPORT TABLESPACE;
Warnings:
Warning	1810	IO Read error: (2, No such file or directory) Error opening './test/t2.cfg', will attempt to import without schema verification
SHOW CREATE TABLE t2;
Table	Create Table
t2	CREATE TABLE `t2` (
  `c3` int(11) DEFAULT NULL,
  `c1` int(11) NOT NULL,
  `c2` int(11) DEFAULT NULL,
  PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t2, t1;
# End of 10.5 tests
#
# MDEV-27006 Assertion `!lock_trx_has_sys_table_locks(trx)'
#	failed in dberr_t row_discard_tablespace_for_mysql
#		(dict_table_t*, trx_t*)
CREATE TABLE t1 (c INT KEY) ENGINE=INNODB;
CREATE TABLE t2 (c INT KEY,FOREIGN KEY(c) REFERENCES t1 (c)) ENGINE=INNODB;
ALTER TABLE t1 DISCARD TABLESPACE;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
DROP TABLE t2, t1;
# End of 10.6 tests