mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / r / read_only_innodb.result
blob690de085bf9479bc55374b0cbc9426f9498a88a9
1 DROP TABLE IF EXISTS table_11733 ;
2 grant CREATE, SELECT, DROP on *.* to test@localhost;
3 set global read_only=0;
4 create table table_11733 (a int) engine=InnoDb;
5 BEGIN;
6 insert into table_11733 values(11733);
7 set global read_only=1;
8 select @@global.read_only;
9 @@global.read_only
11 select * from table_11733 ;
13 11733
14 COMMIT;
15 ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
16 set global read_only=0;
17 drop table table_11733 ;
18 drop user test@localhost;
19 GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
20 CREATE TABLE t1(a INT) ENGINE=INNODB;
21 INSERT INTO t1 VALUES (0), (1);
22 SET GLOBAL read_only=1;
23 SELECT * FROM t1;
27 BEGIN;
28 SELECT * FROM t1;
32 COMMIT;
33 SET GLOBAL read_only=0;
34 FLUSH TABLES WITH READ LOCK;
35 SELECT * FROM t1;
39 BEGIN;
40 SELECT * FROM t1;
44 COMMIT;
45 UNLOCK TABLES;
46 DROP TABLE t1;
47 DROP USER test@localhost;
48 echo End of 5.1 tests