Current Path : /home/usr.opt/mysql57/mysql-test/suite/innodb/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : /home/usr.opt/mysql57/mysql-test/suite/innodb/r/innodb-wl6445-2.result |
SET GLOBAL innodb_file_per_table = 1; SELECT @@innodb_file_per_table; @@innodb_file_per_table 1 DROP DATABASE IF EXISTS testdb_wl6445; CREATE DATABASE testdb_wl6445; case # 1 SET GLOBAL innodb_file_per_table = 1; USE testdb_wl6445; CREATE TABLE t1 ( i int PRIMARY KEY , j blob) ENGINE = InnoDB; INSERT INTO t1 VALUES (1,repeat('a',200)),(2,repeat('b',200)),(3,repeat('c',200)); SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc # restart: --innodb-read-only USE testdb_wl6445; SELECT i FROM t1 ORDER BY i; i 1 2 3 INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc CREATE TABLE t2 ( i int , j blob) ENGINE = Innodb; ERROR HY000: InnoDB is in read only mode. UPDATE t1 SET i = i+1; ERROR HY000: Can't lock file (errno: 165 - Table is read only) FLUSH STATUS; FLUSH LOGS; FLUSH TABLES t1; FLUSH TABLES WITH READ LOCK; UNLOCK TABLES; # restart DROP DATABASE testdb_wl6445; case # 2 CREATE DATABASE testdb_wl6445; USE testdb_wl6445; CREATE TABLE t1 ( i int PRIMARY KEY , j blob) ENGINE = InnoDB; INSERT INTO t1 VALUES (1,repeat('a',200)),(2,repeat('b',200)),(3,repeat('c',200)); SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc CREATE TABLE t2 ( i int PRIMARY KEY , j blob) ENGINE = InnoDB; INSERT INTO t2 VALUES (1,repeat('a',200)),(2,repeat('b',200)),(3,repeat('c',200)); SELECT i,LEFT(j,20) FROM t2 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc UPDATE t2 SET i = i + 10; SELECT i,LEFT(j,20) FROM t2 ORDER BY i; i LEFT(j,20) 11 aaaaaaaaaaaaaaaaaaaa 12 bbbbbbbbbbbbbbbbbbbb 13 cccccccccccccccccccc DELETE FROM t2; SELECT i,LEFT(j,20) FROM t2 ORDER BY i; i LEFT(j,20) # restart: --innodb-read-only USE testdb_wl6445; SELECT i FROM t1 ORDER BY i; i 1 2 3 SELECT i FROM t2 ORDER BY i; i INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc INSERT INTO t1 VALUES (11,repeat('a',200)),(12,repeat('b',200)),(13,repeat('c',200)); ERROR HY000: Can't lock file (errno: 165 - Table is read only) SELECT i,LEFT(j,20) FROM t1 ORDER BY i; i LEFT(j,20) 1 aaaaaaaaaaaaaaaaaaaa 2 bbbbbbbbbbbbbbbbbbbb 3 cccccccccccccccccccc CREATE TABLE t2 ( i int , j blob) ENGINE = Innodb; ERROR 42S01: Table 't2' already exists CREATE TABLE t3 ( i int , j blob) ENGINE = Innodb; ERROR HY000: InnoDB is in read only mode. UPDATE t1 SET i = i+1; ERROR HY000: Can't lock file (errno: 165 - Table is read only) FLUSH STATUS; FLUSH LOGS; FLUSH TABLES t1,t2; FLUSH TABLES WITH READ LOCK; UNLOCK TABLES; case # 3 # Try to restart the server without --innodb-read-only after removing # write permissions of system tablespace. Server should not start. # This confirms server is not automatically started in read-only mode. # restart DROP DATABASE testdb_wl6445;