Debian Codegraph @

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

raw
1 SET @start_value= @@global.log_output;
2 SET @start_general_log= @@global.general_log;
3 '#--------------------FN_DYNVARS_065_01-------------------------#'
4 SET @@global.log_output = 'NONE';
5 connect con1,localhost,root,,,,;
6 SET @@global.log_output = 'TABLE,FILE';
7 connect con2,localhost,root,,,,;
8 SELECT @@global.log_output;
9 @@global.log_output
10 FILE,TABLE
11 '#--------------------FN_DYNVARS_065_02-------------------------#'
12 connection con1;
13 '---Checking general_log when log_output is NONE---'
14 SET @@global.log_output = 'NONE';
15 TRUNCATE TABLE mysql.general_log;
16 DROP TABLE IF EXISTS t1;
17 CREATE TABLE t1(a INT);
18 INSERT INTO t1 VALUE(1);
19 SELECT 'abc';
20 abc
21 abc
22 SELECT count(*) FROM mysql.general_log;
23 count(*)
24 0
25 '---Checking general_log when log_output is TABLE---'
26 SET @@global.log_output = 'TABLE';
27 TRUNCATE TABLE mysql.general_log;
28 DROP TABLE IF EXISTS t1;
29 CREATE TABLE t1(a int);
30 INSERT INTO t1 VALUE(1);
31 SELECT 'abc';
32 abc
33 abc
34 SELECT count(*)>4 FROM mysql.general_log;
35 count(*)>4
36 1
37 SET @@global.general_log = 'OFF';
38 FLUSH LOGS;
39 SET @@global.general_log_file = 'MYSQLTEST_VARDIR/run/mytest.log';
40 SET @@global.general_log = 'ON';
41 SET @@global.log_output = 'FILE';
42 TRUNCATE TABLE mysql.general_log;
43 DROP TABLE IF EXISTS t1;
44 CREATE TABLE t1(a INT);
45 INSERT INTO t1 VALUE(1);
46 SELECT 'abc';
47 abc
48 abc
49 SELECT count(*) FROM mysql.general_log;
50 count(*)
51 0
52 DROP TABLE t1;
53 connection default;
54 SET @@global.general_log= 'OFF';
55 SET @@global.general_log_file= 'start_general_log_file';
56 SET @@global.log_output= @start_value;
57 SET @@global.general_log= @start_general_log;
58 SET @@global.general_log= 'ON';