1
Log file does not exist
2
select * from data_dictionary.plugins join data_dictionary.modules on plugins.plugin_name=modules.module_name where plugin_name='query_log';
4
PLUGIN_TYPE EventObserver
9
MODULE_AUTHOR Daniel Nichter
11
MODULE_LIBRARY query_log
12
MODULE_DESCRIPTION Query Log
14
SELECT @@query_log_enabled, @@query_log_file_enabled;
15
@@query_log_enabled @@query_log_file_enabled
20
SET GLOBAL query_log_file_enabled=TRUE;
21
SELECT @@query_log_enabled, @@query_log_file_enabled;
22
@@query_log_enabled @@query_log_file_enabled
24
# 0000-00-00T00:00:00.000000
25
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
26
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
29
SET GLOBAL query_log_file_enabled=TRUE;
31
# 0000-00-00T00:00:00.000000
32
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
33
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
36
SELECT @@query_log_enabled, @@query_log_file_enabled;
38
SET GLOBAL query_log_enabled=FALSE;
39
SELECT @@query_log_enabled, @@query_log_file_enabled;
40
@@query_log_enabled @@query_log_file_enabled
45
# 0000-00-00T00:00:00.000000
46
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
47
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
50
SET GLOBAL query_log_file_enabled=TRUE;
52
# 0000-00-00T00:00:00.000000
53
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
54
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
57
SELECT @@query_log_enabled, @@query_log_file_enabled;
59
SET GLOBAL query_log_file_enabled=FALSE;
60
SELECT @@query_log_enabled, @@query_log_file_enabled;
61
@@query_log_enabled @@query_log_file_enabled
63
SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query-2.log";
64
SELECT @@query_log_enabled, @@query_log_file_enabled, @@query_log_file;
65
@@query_log_enabled @@query_log_file_enabled @@query_log_file
66
0 0 DRIZZLETEST_VARDIR/query-2.log
67
Log file does not exist
68
SET GLOBAL query_log_enabled=TRUE;
69
SET GLOBAL query_log_file_enabled=TRUE;
70
SELECT 'this is the second log file';
71
this is the second log file
72
this is the second log file
74
# 0000-00-00T00:00:00.000000
75
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
76
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
79
SET GLOBAL query_log_file_enabled=TRUE;
81
# 0000-00-00T00:00:00.000000
82
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
83
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
86
SELECT 'this is the second log file';
88
SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query-3.log";
89
SELECT @@query_log_enabled, @@query_log_file_enabled, @@query_log_file;
90
@@query_log_enabled @@query_log_file_enabled @@query_log_file
91
1 1 DRIZZLETEST_VARDIR/query-3.log
93
SELECT 'this is the third log file';
94
this is the third log file
95
this is the third log file
96
# 0000-00-00T00:00:00.000000
97
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
98
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
100
# schema="third-log-file"
101
SET GLOBAL query_log_file="third-log-file";
103
# 0000-00-00T00:00:00.000000
104
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
105
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
107
# schema="third-log-file"
108
SELECT @@query_log_enabled, @@query_log_file_enabled, @@query_log_file;
110
# 0000-00-00T00:00:00.000000
111
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
112
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
114
# schema="third-log-file"
115
SELECT 'this is the third log file';
117
# 0000-00-00T00:00:00.000000
118
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
119
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
122
SET GLOBAL query_log_file_enabled=TRUE;
124
# 0000-00-00T00:00:00.000000
125
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
126
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
129
SELECT @@query_log_enabled, @@query_log_file_enabled;
131
# 0000-00-00T00:00:00.000000
132
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
133
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
136
SET GLOBAL query_log_file_enabled=TRUE;
138
# 0000-00-00T00:00:00.000000
139
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
140
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
143
SELECT 'this is the second log file';
145
SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query.log";
146
Checking attributes and values of query SELECT DATE(NOW());
148
Checking attributes and values of query SELECT DATE(NOW());
149
execution_time value matches OK
150
lock_time value matches OK
151
session_time value matches OK
152
Checking attributes and values of query SELECT DATE(NOW());
153
rows_examined value equals 0 OK
154
tmp_tables value equals 0 OK
155
warnings value equals 0 OK
156
error value equals false OK
157
schema value equals test OK
161
Checking attributes and values of query SELECT SLEEP(0.5);
162
execution_time value between 0.5 and 0.59 OK
163
SET GLOBAL query_log_enabled=TRUE;
164
SET GLOBAL query_log_file_enabled=FALSE;