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 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;
10 @@global.log_output
11 FILE,TABLE
12 '#--------------------FN_DYNVARS_065_02-------------------------#'
13 'connection con1'
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);
20 SELECT 'abc';
21 abc
22 abc
23 SELECT count(*) FROM mysql.general_log;
24 count(*)
25 0
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);
32 SELECT 'abc';
33 abc
34 abc
35 SELECT count(*)>4 FROM mysql.general_log;
36 count(*)>4
37 1
38 SET @@global.general_log = 'OFF';
39 FLUSH LOGS;
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);
47 SELECT 'abc';
48 abc
49 abc
50 SELECT count(*) FROM mysql.general_log;
51 count(*)
52 0
53 DROP TABLE t1;
54 connection default;
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';