2311.1.1
by Daniel Nichter
Add query_log plugin. It's tested and documented. |
1 |
SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query.log"; |
2 |
SET GLOBAL query_log_file_enabled=TRUE; |
|
3 |
SHOW VARIABLES LIKE 'query_log_threshold%'; |
|
4 |
Variable_name Value |
|
5 |
query_log_threshold_execution_time 0 |
|
6 |
query_log_threshold_lock_time 0 |
|
7 |
query_log_threshold_rows_examined 0 |
|
8 |
query_log_threshold_rows_sent 0 |
|
9 |
query_log_threshold_session_time 0 |
|
10 |
query_log_threshold_tmp_tables 0 |
|
11 |
query_log_threshold_warnings 0 |
|
12 |
SET GLOBAL query_log_threshold_execution_time=500000; |
|
13 |
SELECT @@query_log_threshold_execution_time; |
|
14 |
@@query_log_threshold_execution_time
|
|
15 |
500000
|
|
16 |
||
17 |
SELECT SLEEP(0.4); |
|
18 |
SLEEP(0.4) |
|
19 |
0
|
|
20 |
||
21 |
SELECT SLEEP(0.5); |
|
22 |
SLEEP(0.5) |
|
23 |
0
|
|
24 |
Checking attributes and values of query SELECT SLEEP(0.5); |
|
25 |
execution_time value between 0.5 and 0.59 OK |
|
26 |
Checking attributes and values of query SELECT SLEEP(0.5); |
|
27 |
arg value equals SELECT SLEEP(0.5); OK |
|
28 |
||
2420.1.1
by Daniel
Make first event line start_ts=TS. Update and expand docu; fix a typo (wrong version). |
29 |
# start_ts=0-00-00T00:00:00.000000 |
2311.1.1
by Daniel Nichter
Add query_log plugin. It's tested and documented. |
30 |
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0 |
31 |
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000 |
|
32 |
# error=false |
|
33 |
# schema="test" |
|
34 |
SELECT SLEEP(0.0); |
|
35 |
#
|
|
36 |
SET GLOBAL query_log_file_enabled=FALSE; |
|
37 |
SET GLOBAL query_log_file_enabled=TRUE; |
|
38 |
SET GLOBAL query_log_threshold_execution_time=0; |
|
39 |
SELECT @@query_log_threshold_execution_time; |
|
40 |
@@query_log_threshold_execution_time
|
|
41 |
0
|
|
42 |
SELECT 'one'; |
|
43 |
one
|
|
44 |
one
|
|
45 |
Checking attributes and values of query SELECT 'one'; |
|
46 |
arg value equals SELECT 'one'; OK |
|
47 |
||
2420.1.1
by Daniel
Make first event line start_ts=TS. Update and expand docu; fix a typo (wrong version). |
48 |
# start_ts=0-00-00T00:00:00.000000 |
2311.1.10
by Daniel Nichter
Make tests idempotent. |
49 |
# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0 |
2311.1.1
by Daniel Nichter
Add query_log plugin. It's tested and documented. |
50 |
# execution_time=0.000000 lock_time=0.000000 session_time=0.000000 |
51 |
# error=false |
|
52 |
# schema="test" |
|
53 |
SELECT 'one'; |
|
54 |
#
|