blob: f584ffadc0537813aa0ec8c27fac4802a0ae2acc (
plain)
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
|
CREATE TABLE t (a SERIAL) ENGINE=InnoDB;
connect dml,localhost,root;
select * from t;
a
connection default;
TRUNCATE TABLE t;
disconnect dml;
DROP TABLE t;
#
# MDEV-17816 Crash in TRUNCATE TABLE when table creation fails
#
CREATE TABLE t1 (c VARCHAR(1024), KEY(c)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
INSERT INTO t1 SET c='character';
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
TRUNCATE TABLE t1;
ERROR HY000: Index column size too large. The maximum column size is 767 bytes
SELECT * FROM t1;
c
character
DROP TABLE t1;
#
# MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSED
#
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB KEY_BLOCK_SIZE=4;
TRUNCATE TABLE t1;
SHOW TABLE STATUS;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary
t1 InnoDB # Compressed # # # # # # 1 # # NULL latin1_swedish_ci NULL key_block_size=4 0 N
DROP TABLE t1;
#
# MDEV-17859 Operating system errors in file operations
# after failed CREATE
#
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
call mtr.add_suppression("InnoDB: (Operating system )?[Ee]rror number");
call mtr.add_suppression("InnoDB: Cannot create file '.*t1\\.ibd");
FLUSH TABLES;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
ERROR HY000: Tablespace for table '`test`.`t1`' exists. Please DISCARD the tablespace before IMPORT
SELECT * FROM t1;
a
1
DROP TABLE t1;
|