Debian Codegraph @

mysql-test/suite/innodb/r/innodb_read_only.result

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