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