Debian Codegraph @

mysql-test/suite/sys_vars/r/read_only_func.result

raw
1 ** Setup **
2
3 SET @default_read_only = @@read_only;
4 '#--------------------FN_DYNVARS_140_01-------------------------#'
5 SET Global read_only=ON;
6 DROP TABLE IF EXISTS t1;
7 CREATE TABLE t1
8 (
9 id INT NOT NULL auto_increment,
10 PRIMARY KEY (id),
11 name BLOB
12 );
13 INSERT into t1(name) values("aaassssssssddddddddffffff");
14 update t1 set name="jfjdf" where id=1;
15 select * from t1 where id=1;
16 id name
17 1 jfjdf
18 '#--------------------FN_DYNVARS_140_02-------------------------#'
19 ** Creating new user with out super privilege**
20 CREATE user sameea;
21 ** Connecting connn using username 'sameea' **
22 SET Global read_ONLY=ON;
23 ERROR 42000: Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation
24 CREATE TABLE t2
25 (
26 id INT NOT NULL auto_increment,
27 PRIMARY KEY (id),
28 name BLOB
29 );
30 ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
31 not updating values
32 INSERT into t2(name) values("aaassssssssddddddddffffff");
33 Got one of the listed errors
34 UPDATE t2 SET name="samia" where id=1;
35 Got one of the listed errors
36 '#--------------------FN_DYNVARS_140_03-------------------------#'
37 CREATE TEMPORARY TABLE t3(a int);
38 '#--------------------FN_DYNVARS_140_04-------------------------#'
39 ** Connection default **
40 SET Global read_only=OFF;
41 ** Connection connn **
42 CREATE TABLE t2
43 (
44 id INT NOT NULL auto_increment,
45 PRIMARY KEY (id),
46 name BLOB
47 );
48 updating values
49 INSERT into t2(name) values("aaassssssssdddddddd");
50 UPDATE t2 SET name="samia" where id=1;
51 ** Connection default **
52 ** Disconnecting connn **
53 DROP USER sameea;
54 DROP TABLE t1;
55 DROP TABLE t2;
56 SET global read_only = @default_read_only;