1CREATE DATABASE WL6445;
2CREATE TABLE WL6445.t1(c1 INT, c2 INT, INDEX sec_idx(c2)) ENGINE=InnoDB;
3INSERT INTO WL6445.t1 VALUES(0,0),(1,1),(2,2);
4SHOW CREATE TABLE WL6445.t1;
5Table	Create Table
6t1	CREATE TABLE `t1` (
7  `c1` int(11) DEFAULT NULL,
8  `c2` int(11) DEFAULT NULL,
9  KEY `sec_idx` (`c2`)
10) ENGINE=InnoDB DEFAULT CHARSET=latin1
11SET GLOBAL innodb_fast_shutdown = 0;
12# restart: --innodb-read-only
13SELECT COUNT(*) FROM WL6445.t1;
14COUNT(*)
153
16INSERT INTO WL6445.t1 VALUES(3,3);
17ERROR HY000: Can't lock file (errno: 165 - Table is read only)
18INSERT INTO WL6445.t1 SELECT * FROM WL6445.t1;
19ERROR HY000: Table 't1' is read only
20REPLACE INTO WL6445.t1 VALUES(1,1);
21ERROR HY000: Can't lock file (errno: 165 - Table is read only)
22UPDATE WL6445.t1 SET c1 = c1 + 100;
23ERROR HY000: Can't lock file (errno: 165 - Table is read only)
24DELETE FROM WL6445.t1;
25ERROR HY000: Can't lock file (errno: 165 - Table is read only)
26ALTER TABLE WL6445.t1 ADD COLUMN c2 INT;
27ERROR 42S21: Duplicate column name 'c2'
28ALTER TABLE WL6445.t1 ADD UNIQUE INDEX(c1);
29ERROR HY000: Can't lock file (errno: 165 - Table is read only)
30ALTER TABLE WL6445.t1 DROP INDEX sec_idx;
31ERROR HY000: Can't lock file (errno: 165 - Table is read only)
32DROP TABLE WL6445.t1;
33ERROR 42S02: Unknown table 'WL6445.t1'
34TRUNCATE TABLE WL6445.t1;
35ERROR HY000: Table 't1' is read only
36RENAME TABLE WL6445.t1 TO WL6444.t2;
37ERROR HY000: Error on rename of 't1' to 't2' (errno: 165 - Table is read only)
38DROP DATABASE WL6445;
39ERROR 42S02: Unknown table 'WL6445.t1'
40SHOW CREATE TABLE WL6445.t1;
41Table	Create Table
42t1	CREATE TABLE `t1` (
43  `c1` int(11) DEFAULT NULL,
44  `c2` int(11) DEFAULT NULL,
45  KEY `sec_idx` (`c2`)
46) ENGINE=InnoDB DEFAULT CHARSET=latin1
47# restart
48DROP TABLE WL6445.t1;
49DROP DATABASE WL6445;
50