~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/query_log/tests/r/file.result

  • Committer: Olaf van der Spek
  • Date: 2011-08-11 09:18:19 UTC
  • mfrom: (2395 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2396.
  • Revision ID: olafvdspek@gmail.com-20110811091819-em9vnmtco1zt6uvm
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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';
 
3
PLUGIN_NAME     query_log
 
4
PLUGIN_TYPE     EventObserver
 
5
IS_ACTIVE       YES
 
6
MODULE_NAME     query_log
 
7
MODULE_NAME     query_log
 
8
MODULE_VERSION  1.0
 
9
MODULE_AUTHOR   Daniel Nichter
 
10
IS_BUILTIN      NO
 
11
MODULE_LIBRARY  query_log
 
12
MODULE_DESCRIPTION      Query Log
 
13
MODULE_LICENSE  GPL
 
14
SELECT @@query_log_enabled, @@query_log_file_enabled;
 
15
@@query_log_enabled     @@query_log_file_enabled
 
16
1       0
 
17
SELECT 1;
 
18
1
 
19
1
 
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
 
23
1       1
 
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
 
27
# error=false
 
28
# schema="test"
 
29
SET GLOBAL query_log_file_enabled=TRUE;
 
30
#
 
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
 
34
# error=false
 
35
# schema="test"
 
36
SELECT @@query_log_enabled, @@query_log_file_enabled;
 
37
#
 
38
SET GLOBAL query_log_enabled=FALSE;
 
39
SELECT @@query_log_enabled, @@query_log_file_enabled;
 
40
@@query_log_enabled     @@query_log_file_enabled
 
41
0       1
 
42
SELECT 2;
 
43
2
 
44
2
 
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
 
48
# error=false
 
49
# schema="test"
 
50
SET GLOBAL query_log_file_enabled=TRUE;
 
51
#
 
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
 
55
# error=false
 
56
# schema="test"
 
57
SELECT @@query_log_enabled, @@query_log_file_enabled;
 
58
#
 
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
 
62
0       0
 
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
 
73
Log file exists
 
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
 
77
# error=false
 
78
# schema="test"
 
79
SET GLOBAL query_log_file_enabled=TRUE;
 
80
#
 
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
 
84
# error=false
 
85
# schema="test"
 
86
SELECT 'this is the second log file';
 
87
#
 
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
 
92
Log file exists
 
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
 
99
# error=false
 
100
# schema="third-log-file"
 
101
SET GLOBAL query_log_file="third-log-file";
 
102
#
 
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
 
106
# error=false
 
107
# schema="third-log-file"
 
108
SELECT @@query_log_enabled, @@query_log_file_enabled, @@query_log_file;
 
109
#
 
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
 
113
# error=false
 
114
# schema="third-log-file"
 
115
SELECT 'this is the third log file';
 
116
#
 
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
 
120
# error=false
 
121
# schema="test"
 
122
SET GLOBAL query_log_file_enabled=TRUE;
 
123
#
 
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
 
127
# error=false
 
128
# schema="test"
 
129
SELECT @@query_log_enabled, @@query_log_file_enabled;
 
130
#
 
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
 
134
# error=false
 
135
# schema="test"
 
136
SET GLOBAL query_log_file_enabled=TRUE;
 
137
#
 
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
 
141
# error=false
 
142
# schema="test"
 
143
SELECT 'this is the second log file';
 
144
#
 
145
SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query.log";
 
146
Checking attributes and values of query SELECT DATE(NOW());
 
147
ts value matches OK
 
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
 
158
SELECT SLEEP(0.5);
 
159
SLEEP(0.5)
 
160
0
 
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;