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\'';
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\'';
22
UPDATE t1 SET a = 'aa1' WHERE a = 'aa1-updated'
23
'#--------------------FN_DYNVARS_158_03--------------------------#'
24
** Connecting con_int1 using root **
25
** Connection con_int1 **
26
SELECT @@SESSION.sql_log_off;
30
SET SESSION sql_log_off = FALSE;
31
** Connecting con_int2 using root **
32
** Connection con_int2 **
33
SELECT @@SESSION.sql_log_off;
37
SET SESSION sql_log_off = TRUE;
38
** Connection con_int2 **
39
SELECT @@SESSION.sql_log_off;
43
** Connection con_int1 **
44
SELECT @@SESSION.sql_log_off;
48
** Connection default **
49
Disconnecting Connections con_int1, con_int2
50
SET SESSION sql_log_off = @default_sql_log_off;