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