Debian Codegraph @

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

raw
1 ** Setup **
2
3 SET @default_sql_log_off = @@sql_log_off;
4 CREATE TEMPORARY TABLE t1(a varchar(20), b varchar(20));
5 INSERT INTO t1 VALUES('aa1','bb');
6 INSERT INTO t1 VALUES('aa2','bb');
7 INSERT INTO t1 VALUES('aa3','bb');
8 INSERT INTO t1 VALUES('aa4','bb');
9 INSERT INTO t1 VALUES('aa5','bb');
10 '#--------------------FN_DYNVARS_158_01-------------------------#'
11 SET SESSION sql_log_off = ON;
12 UPDATE t1 SET a = 'aa1-updated' WHERE a = 'aa1';
13 Checking if log contains the executed statement
14 SELECT argument FROM mysql.general_log WHERE argument = 'UPDATE t1 SET a = \'aa1-updated\' WHERE a = \'aa1\'';
15 argument
16 '#--------------------FN_DYNVARS_158_02-------------------------#'
17 SET SESSION sql_log_off = OFF;
18 UPDATE t1 SET a = 'aa1' WHERE a = 'aa1-updated';
19 Checking if log contains the executed statement
20 SELECT argument FROM mysql.general_log WHERE argument = 'UPDATE t1 SET a = \'aa1\' WHERE a = \'aa1-updated\'';
21 argument
22 '#--------------------FN_DYNVARS_158_03--------------------------#'
23 ** Connecting con_int1 using root **
24 ** Connection con_int1 **
25 SELECT @@SESSION.sql_log_off;
26 @@SESSION.sql_log_off
27 0
28 0 / FALSE Expected
29 SET SESSION sql_log_off = FALSE;
30 ** Connecting con_int2 using root **
31 ** Connection con_int2 **
32 SELECT @@SESSION.sql_log_off;
33 @@SESSION.sql_log_off
34 0
35 0 / FALSE Expected
36 SET SESSION sql_log_off = TRUE;
37 ** Connection con_int2 **
38 SELECT @@SESSION.sql_log_off;
39 @@SESSION.sql_log_off
40 1
41 1 / TRUE Expected
42 ** Connection con_int1 **
43 SELECT @@SESSION.sql_log_off;
44 @@SESSION.sql_log_off
45 0
46 0 / FALSE Expected
47 ** Connection default **
48 Disconnecting Connections con_int1, con_int2
49 SET SESSION sql_log_off = @default_sql_log_off;
50 DROP TABLE t1;