|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/share/mysql-test/r/ |
Upload File : |
DROP TABLE IF EXISTS table_11733 ; grant CREATE, SELECT, DROP on *.* to test@localhost; set global read_only=0; create table table_11733 (a int) engine=InnoDb; BEGIN; insert into table_11733 values(11733); set global read_only=1; select @@global.read_only; @@global.read_only 1 select * from table_11733 ; a 11733 COMMIT; ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement set global read_only=0; drop table table_11733 ; drop user test@localhost; GRANT CREATE, SELECT, DROP ON *.* TO test@localhost; CREATE TABLE t1(a INT) ENGINE=INNODB; INSERT INTO t1 VALUES (0), (1); SET GLOBAL read_only=1; SELECT * FROM t1; a 0 1 BEGIN; SELECT * FROM t1; a 0 1 COMMIT; SET GLOBAL read_only=0; FLUSH TABLES WITH READ LOCK; SELECT * FROM t1; a 0 1 BEGIN; SELECT * FROM t1; a 0 1 COMMIT; UNLOCK TABLES; DROP TABLE t1; DROP USER test@localhost; echo End of 5.1 tests