1
SET @start_value= @@global.log_output;
2
SET @start_general_log= @@global.general_log;
3
SET @start_general_log_file= @@global.general_log_file;
4
'#--------------------FN_DYNVARS_065_01-------------------------#'
5
SET @@global.log_output = 'NONE';
6
'connect (con1,localhost,root,,,,)'
7
SET @@global.log_output = 'TABLE,FILE';
8
'connect (con2,localhost,root,,,,)'
9
SELECT @@global.log_output;
12
'#--------------------FN_DYNVARS_065_02-------------------------#'
14
'---Checking general_log when log_output is NONE---'
15
SET @@global.log_output = 'NONE';
16
TRUNCATE TABLE mysql.general_log;
17
DROP TABLE IF EXISTS t1;
18
CREATE TABLE t1(a INT);
19
INSERT INTO t1 VALUE(1);
23
SELECT count(*) FROM mysql.general_log;
26
'---Checking general_log when log_output is TABLE---'
27
SET @@global.log_output = 'TABLE';
28
TRUNCATE TABLE mysql.general_log;
29
DROP TABLE IF EXISTS t1;
30
CREATE TABLE t1(a int);
31
INSERT INTO t1 VALUE(1);
35
SELECT count(*)>4 FROM mysql.general_log;
38
SET @@global.general_log = 'OFF';
40
SET @@global.general_log_file = 'MYSQLTEST_VARDIR/run/mytest.log';
41
SET @@global.general_log = 'ON';
42
SET @@global.log_output = 'FILE';
43
TRUNCATE TABLE mysql.general_log;
44
DROP TABLE IF EXISTS t1;
45
CREATE TABLE t1(a INT);
46
INSERT INTO t1 VALUE(1);
50
SELECT count(*) FROM mysql.general_log;
55
SET @@global.general_log= 'OFF';
56
SET @@global.general_log_file= @start_general_log_file;
57
SET @@global.log_output= @start_value;
58
SET @@global.general_log= @start_general_log;
59
SET @@global.general_log= 'ON';