1# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
2SET GLOBAL innodb_file_per_table=1;
3#
4# Bug#21644827 - FTS, ASSERT !SRV_READ_ONLY_MODE || M_IMPL.M_LOG_MODE ==
5#                MTR_LOG_NO_REDO
6#
7SET GLOBAL innodb_file_per_table=ON;
8create table t1 (a int not null, d varchar(15) not null, b
9varchar(198) not null, c char(156)) engine=InnoDB
10row_format=redundant;
11insert into t1 values(123, 'abcdef', 'jghikl', 'mnop');
12insert into t1 values(456, 'abcdef', 'jghikl', 'mnop');
13insert into t1 values(789, 'abcdef', 'jghikl', 'mnop');
14insert into t1 values(134, 'kasdfsdsadf', 'adfjlasdkfjasd', 'adfsadflkasdasdfljasdf');
15insert into t1 select * from t1;
16insert into t1 select * from t1;
17insert into t1 select * from t1;
18insert into t1 select * from t1;
19insert into t1 select * from t1;
20insert into t1 select * from t1;
21insert into t1 select * from t1;
22insert into t1 select * from t1;
23insert into t1 select * from t1;
24insert into t1 select * from t1;
25SET GLOBAL innodb_file_per_table=OFF;
26create table t2 (a int not null, d varchar(15) not null, b
27varchar(198) not null, c char(156), fulltext ftsic(c)) engine=InnoDB
28row_format=redundant;
29insert into t2 select * from t1;
30create table t3 (a int not null, d varchar(15) not null, b varchar(198),
31c varchar(150), index k1(c(99), b(56)), index k2(b(5), c(10))) engine=InnoDB
32row_format=redundant;
33insert into t3 values(444, 'dddd', 'bbbbb', 'aaaaa');
34insert into t3 values(555, 'eeee', 'ccccc', 'aaaaa');
35SET GLOBAL innodb_fast_shutdown=0;
36# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0 --innodb-read-only
37SELECT COUNT(*) FROM t1;
38COUNT(*)
394096
40SELECT COUNT(*) FROM t2;
41COUNT(*)
424096
43SELECT COUNT(*) FROM t3;
44COUNT(*)
452
46TRUNCATE TABLE t1;
47ERROR HY000: Table 't1' is read only
48TRUNCATE TABLE t2;
49ERROR HY000: Table 't2' is read only
50TRUNCATE TABLE t3;
51ERROR HY000: Table 't3' is read only
52# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
53TRUNCATE TABLE t1;
54TRUNCATE TABLE t2;
55TRUNCATE TABLE t3;
56corrupted SYS_TABLES.MIX_LEN for test/t1
57corrupted SYS_TABLES.MIX_LEN for test/t2
58corrupted SYS_TABLES.MIX_LEN for test/t3
59# restart: --innodb-data-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-log-group-home-dir=MYSQLTEST_VARDIR/tmp/row_format_redundant --innodb-data-file-path=ibdata1:1M:autoextend --innodb-undo-tablespaces=0 --innodb-stats-persistent=0
60TRUNCATE TABLE t1;
61ERROR 42S02: Table 'test.t1' doesn't exist in engine
62TRUNCATE TABLE t2;
63TRUNCATE TABLE t3;
64SELECT COUNT(*) FROM t1;
65ERROR 42S02: Table 'test.t1' doesn't exist in engine
66SELECT COUNT(*) FROM t2;
67COUNT(*)
680
69SELECT COUNT(*) FROM t3;
70COUNT(*)
710
72RENAME TABLE t1 TO tee_one;
73ERROR HY000: Error on rename of './test/t1' to './test/tee_one' (errno: 155 "The table does not exist in the storage engine")
74DROP TABLE t1;
75Warnings:
76Warning	1932	Table 'test.t1' doesn't exist in engine
77DROP TABLE t2,t3;
78FOUND 6 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
79# restart
80ib_buffer_pool
81ib_logfile0
82ib_logfile1
83ibdata1
84db.opt
85