Debian Codegraph @

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

raw
1 --source include/have_innodb.inc
2 --source include/innodb_row_format.inc
3 --source include/test_db_charset_latin1.inc
4
5 CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB;
6 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
7 SHOW TABLE STATUS LIKE 't1';
8 DROP TABLE t1;
9
10 CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
11 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
12 SHOW TABLE STATUS LIKE 't1';
13 DROP TABLE t1;
14
15 CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=COMPACT;
16 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
17 SHOW TABLE STATUS LIKE 't1';
18 DROP TABLE t1;
19
20 CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
21 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
22 SHOW TABLE STATUS LIKE 't1';
23 DROP TABLE t1;
24
25 --disable_query_log
26 SET @save_innodb_read_only_compressed=@@GLOBAL.innodb_read_only_compressed;
27 SET GLOBAL innodb_read_only_compressed=OFF;
28 --enable_query_log
29 CREATE TABLE t1(c1 TEXT,c2 BLOB) ENGINE=InnoDB
30 ROW_FORMAT=COMPRESSED;
31 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
32 SHOW TABLE STATUS LIKE 't1';
33 TRUNCATE TABLE t1;
34 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
35 SHOW TABLE STATUS LIKE 't1';
36 --disable_query_log
37 SET GLOBAL innodb_read_only_compressed=@save_innodb_read_only_compressed;
38 --enable_query_log
39 DROP TABLE t1;
40
41 --error 0,ER_CANT_CREATE_TABLE
42 CREATE TABLE t1 (c1 INT) ENGINE=InnoDB page_compressed=1;
43 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
44 SHOW TABLE STATUS LIKE 't1';
45 DROP TABLE IF EXISTS t1;
46
47 SET @save_format = @@GLOBAL.innodb_default_row_format;
48 SET GLOBAL innodb_default_row_format = redundant;
49 CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
50 SET GLOBAL innodb_default_row_format = @save_format;
51 TRUNCATE TABLE t1;
52 --replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 #
53 SHOW TABLE STATUS LIKE 't1';
54 DROP TABLE t1;
55
56 SET @save_level=@@GLOBAL.innodb_compression_level;
57 SET GLOBAL innodb_compression_level=0;
58 --error ER_CANT_CREATE_TABLE
59 CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
60 SHOW WARNINGS;
61 --disable_warnings
62 --error 0,ER_CANT_CREATE_TABLE
63 CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1 page_compression_level=1;
64 DROP TABLE IF EXISTS t;
65 SET GLOBAL innodb_compression_level=1;
66 --error 0,ER_CANT_CREATE_TABLE
67 CREATE TABLE t(c INT) ENGINE=InnoDB page_compressed=1;
68 DROP TABLE IF EXISTS t;
69 --enable_warnings
70
71 SET GLOBAL innodb_compression_level=1;
72 CREATE TABLE t(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC page_compressed=1;
73 CREATE TEMPORARY TABLE tt(a INT PRIMARY KEY)
74 ROW_FORMAT=DYNAMIC page_compressed=1 ENGINE=InnoDB;
75 SET GLOBAL innodb_compression_level=0;
76 --error ER_ILLEGAL_HA_CREATE_OPTION
77 ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=INPLACE;
78 --error ER_CANT_CREATE_TABLE
79 ALTER TABLE t FORCE, ROW_FORMAT=DEFAULT, ALGORITHM=COPY;
80 DROP TABLE t;
81 TRUNCATE tt;
82 SET GLOBAL innodb_compression_level=@save_level;
83
84 --source include/test_db_charset_restore.inc