Merge lp:~daniel-nichter/drizzle/query-log-ts into lp:~drizzle-trunk/drizzle/development

Proposed by Daniel Nichter
Status: Merged
Approved by: Mark Atwood
Approved revision: 2421
Merged at revision: 2422
Proposed branch: lp:~daniel-nichter/drizzle/query-log-ts
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 385 lines (+64/-42)
8 files modified
plugin/query_log/docs/index.rst (+42/-18)
plugin/query_log/file.cc (+2/-1)
plugin/query_log/tests/check-query-log-attribute.pl (+1/-4)
plugin/query_log/tests/r/check_query_log_attribute.result (+1/-1)
plugin/query_log/tests/r/file.result (+14/-14)
plugin/query_log/tests/r/thresholds.result (+2/-2)
plugin/query_log/tests/samples/sample-event.log (+1/-1)
plugin/query_log/tests/t/file.test (+1/-1)
To merge this branch: bzr merge lp:~daniel-nichter/drizzle/query-log-ts
Reviewer Review Type Date Requested Status
Drizzle Merge Team Pending
Review via email: mp+75924@code.launchpad.net

Description of the change

Just changes to query_log plugin, primarily: make first line of events "start_ts=VALUE" instead of a special bare "VALUE". This makes it possible to match/parse all attributes with one pattern because they are now all of the form ATTRIBUTE=VALUE. Documented meta-format of query log file.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugin/query_log/docs/index.rst'
--- plugin/query_log/docs/index.rst 2011-09-03 22:25:16 +0000
+++ plugin/query_log/docs/index.rst 2011-09-18 20:15:24 +0000
@@ -116,7 +116,7 @@
116* ``query_log_enabled``116* ``query_log_enabled``
117117
118 :Scope: Global118 :Scope: Global
119 :Dynamic: No119 :Dynamic: Yes
120 :Option:120 :Option:
121121
122 If query logging is globally enabled or not.122 If query logging is globally enabled or not.
@@ -126,7 +126,7 @@
126* ``query_log_file``126* ``query_log_file``
127127
128 :Scope: Global128 :Scope: Global
129 :Dynamic: No129 :Dynamic: Yes
130 :Option: :option:`--query-log.file`130 :Option: :option:`--query-log.file`
131131
132 Query log file.132 Query log file.
@@ -136,7 +136,7 @@
136* ``query_log_file_enabled``136* ``query_log_file_enabled``
137137
138 :Scope: Global138 :Scope: Global
139 :Dynamic: No139 :Dynamic: Yes
140 :Option: :option:`--query-log.file-enabled`140 :Option: :option:`--query-log.file-enabled`
141141
142 If query logging to a file is enabled.142 If query logging to a file is enabled.
@@ -146,7 +146,7 @@
146* ``query_log_threshold_execution_time``146* ``query_log_threshold_execution_time``
147147
148 :Scope: Global148 :Scope: Global
149 :Dynamic: No149 :Dynamic: Yes
150 :Option: :option:`--query-log.threshold-execution-time`150 :Option: :option:`--query-log.threshold-execution-time`
151151
152 Threshold for logging slow queries.152 Threshold for logging slow queries.
@@ -156,7 +156,7 @@
156* ``query_log_threshold_lock_time``156* ``query_log_threshold_lock_time``
157157
158 :Scope: Global158 :Scope: Global
159 :Dynamic: No159 :Dynamic: Yes
160 :Option: :option:`--query-log.threshold-lock-time`160 :Option: :option:`--query-log.threshold-lock-time`
161161
162 Threshold for logging long locking queries.162 Threshold for logging long locking queries.
@@ -166,7 +166,7 @@
166* ``query_log_threshold_rows_examined``166* ``query_log_threshold_rows_examined``
167167
168 :Scope: Global168 :Scope: Global
169 :Dynamic: No169 :Dynamic: Yes
170 :Option: :option:`--query-log.threshold-rows-examined`170 :Option: :option:`--query-log.threshold-rows-examined`
171171
172 Threshold for logging queries that examine too many rows.172 Threshold for logging queries that examine too many rows.
@@ -176,7 +176,7 @@
176* ``query_log_threshold_rows_sent``176* ``query_log_threshold_rows_sent``
177177
178 :Scope: Global178 :Scope: Global
179 :Dynamic: No179 :Dynamic: Yes
180 :Option: :option:`--query-log.threshold-rows-sent`180 :Option: :option:`--query-log.threshold-rows-sent`
181181
182 Threshold for logging queries that return too many rows.182 Threshold for logging queries that return too many rows.
@@ -186,7 +186,7 @@
186* ``query_log_threshold_session_time``186* ``query_log_threshold_session_time``
187187
188 :Scope: Global188 :Scope: Global
189 :Dynamic: No189 :Dynamic: Yes
190 :Option: :option:`--query-log.threshold-session-time`190 :Option: :option:`--query-log.threshold-session-time`
191191
192 Threshold for logging queries that are active too long.192 Threshold for logging queries that are active too long.
@@ -196,7 +196,7 @@
196* ``query_log_threshold_tmp_tables``196* ``query_log_threshold_tmp_tables``
197197
198 :Scope: Global198 :Scope: Global
199 :Dynamic: No199 :Dynamic: Yes
200 :Option: :option:`--query-log.threshold-tmp-tables`200 :Option: :option:`--query-log.threshold-tmp-tables`
201201
202 Threshold for logging queries that use too many temporary tables.202 Threshold for logging queries that use too many temporary tables.
@@ -206,7 +206,7 @@
206* ``query_log_threshold_warnings``206* ``query_log_threshold_warnings``
207207
208 :Scope: Global208 :Scope: Global
209 :Dynamic: No209 :Dynamic: Yes
210 :Option: :option:`--query-log.threshold-warnings`210 :Option: :option:`--query-log.threshold-warnings`
211211
212 Threshold for logging queries that cause too many warnings.212 Threshold for logging queries that cause too many warnings.
@@ -214,7 +214,7 @@
214Examples214Examples
215--------215--------
216216
217Start Drizzle with the query plugin and log queries that take longer than 1 second to execute to the default log file:217Start Drizzle with the query plugin and log queries that take longer than 1 second to execute to the default query log file:
218218
219.. code-block:: none219.. code-block:: none
220220
@@ -257,20 +257,20 @@
257Log File257Log File
258^^^^^^^^258^^^^^^^^
259259
260The log file destination is enabled when both ``query_log_enabled`` and ``query_log_file_enabled`` are true (``SHOW VARIABLES`` lists ``ON`` and ``OFF`` instead of ``TRUE`` and ``FASLE``). When ``query_log_file_enabled`` is true, the ``query_log_file`` is open. When ``query_log_file_enabled`` is set false, the log file is closed. This is helpful if you want to rotate the log file.260The query log file destination is enabled when both ``query_log_enabled`` and ``query_log_file_enabled`` are true (``SHOW VARIABLES`` lists ``ON`` and ``OFF`` instead of ``TRUE`` and ``FASLE``). When ``query_log_file_enabled`` is true, the ``query_log_file`` is open. When ``query_log_file_enabled`` is set false, the query log file is closed. This is helpful if you want to rotate the query log file.
261261
262The log file is a plain text, structured file that is readable by humans and easily parsable by tools. It looks like:262The query log file is a plain text, structured file that is readable by humans and easily parsable by tools. It looks like:
263263
264.. code-block:: none264.. code-block:: none
265265
266 # 2011-05-15T01:48:17.814985266 # start_ts=2011-05-15T01:48:17.814985
267 # session_id=1 query_id=6 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=1267 # session_id=1 query_id=6 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=1
268 # execution_time=0.000315 lock_time=0.000315 session_time=16.723020268 # execution_time=0.000315 lock_time=0.000315 session_time=16.723020
269 # error=true269 # error=true
270 # schema=""270 # schema=""
271 set query_log_file_enabled=true;271 set query_log_file_enabled=true;
272 #272 #
273 # 2011-05-15T01:48:21.526746273 # start_ts=2011-05-15T01:48:21.526746
274 # session_id=1 query_id=7 rows_examined=10 rows_sent=10 tmp_tables=0 warnings=0274 # session_id=1 query_id=7 rows_examined=10 rows_sent=10 tmp_tables=0 warnings=0
275 # execution_time=0.000979 lock_time=0.000562 session_time=20.435445275 # execution_time=0.000979 lock_time=0.000562 session_time=20.435445
276 # error=false276 # error=false
@@ -280,7 +280,31 @@
280280
281Events are separated by a single ``#`` character. This record separator can be used by programs like :program:`awk` and :program:`perl` to easily separate events in a log.281Events are separated by a single ``#`` character. This record separator can be used by programs like :program:`awk` and :program:`perl` to easily separate events in a log.
282282
283The first line line of each event is a UTC/GMT timestamp with microsecond precision; the timezone cannot be changed. The second line has attributes with integer values. The third line has attributes with high-precision time values, always with six decimals places of precision. The fourth line has attributes with boolean values, either ``true`` or ``false``. The fifth line has attributes with string values, always double-quoted. Remaining lines are the query which can contain multiple lines, blank lines, et. The record separator marks the event of the event.283The first line of each event has UTC/GMT timestamps with microsecond precision; the timezone cannot be changed. The second line has attributes with integer values. The third line has attributes with high-precision time values, always with six decimals places of precision. The fourth line has attributes with boolean values, either ``true`` or ``false``. The fifth line has attributes with string values, always double-quoted. Remaining lines are the query which can contain multiple lines, blank lines, et. The record separator marks the event of the event.
284
285As the example above demonstrates, the meta-format for each event in the query log is::
286
287 # attribute=value
288 query
289 #
290
291Parsing a query log file should be easy since the format is static, consistent, and follows
292these rules:
293
294 * Attribute-value pairs are on comment lines that begin with one ``#`` character followed
295 by a space.
296 * Comment lines have one or more attribute-value pairs.
297 * Attribute-value pairs are separated by one space.
298 * Attribute names are lowercase with only characters ``a`` to ``z`` and ``_`` (underscore).
299 * Attribute names with suffix ``_ts`` have microsecond UTC/GMT timestamp values.
300 * Attribute names with suffix ``_time`` have values with an amount of time in seconds with
301 microsecond precision.
302 * One or more comment line precedes the query.
303 * A query is always printed; there are no "admin commands" or special queries.
304 * Every query is terminated by one ``#`` character followed by a newline (``\n``),
305 even the last query in the log file.
306 * There are no blank lines between events.
307 * Only events with this format are printed; there are no special or "fluff" lines.
284308
285Bugs and Limitations309Bugs and Limitations
286--------------------310--------------------
@@ -316,7 +340,7 @@
316Version340Version
317-------341-------
318342
319This documentation applies to **query_log 0.1**.343This documentation applies to **query_log 1.0**.
320344
321To see which version of the plugin a Drizzle server is running, execute:345To see which version of the plugin a Drizzle server is running, execute:
322346
@@ -327,6 +351,6 @@
327Changelog351Changelog
328---------352---------
329353
330v0.1354v1.0
331^^^^355^^^^
332* First release.356* First release.
333357
=== modified file 'plugin/query_log/file.cc'
--- plugin/query_log/file.cc 2011-07-30 21:28:21 +0000
+++ plugin/query_log/file.cc 2011-09-18 20:15:24 +0000
@@ -37,7 +37,8 @@
37{37{
38 if (_fh.is_open())38 if (_fh.is_open())
39 {39 {
40 _fh << "# " << event->ts << "\n"40 _fh << "# start_ts=" << event->ts
41 << "\n"
41 << "# session_id=" << event->session_id42 << "# session_id=" << event->session_id
42 << " query_id=" << event->query_id43 << " query_id=" << event->query_id
43 << " rows_examined=" << event->rows_examined44 << " rows_examined=" << event->rows_examined
4445
=== modified file 'plugin/query_log/tests/check-query-log-attribute.pl'
--- plugin/query_log/tests/check-query-log-attribute.pl 2011-05-15 17:58:28 +0000
+++ plugin/query_log/tests/check-query-log-attribute.pl 2011-09-18 20:15:24 +0000
@@ -103,10 +103,7 @@
103 my $lineno = 1;103 my $lineno = 1;
104 foreach my $line ( @event_lines ) { 104 foreach my $line ( @event_lines ) {
105 next if $line =~ m/^$/;105 next if $line =~ m/^$/;
106 if ( $lineno == 1 ) { # timestamp106 if ( $lineno <= 4 ) { # ts, ints, floats and bools
107 push @props, 'ts', $line =~ m/^# (\S+)/;
108 }
109 elsif ( $lineno >= 2 && $lineno <= 4 ) { # ints, floats and bools
110 push @props, $line =~ m/([a-z_]+)=(\S+)/g;107 push @props, $line =~ m/([a-z_]+)=(\S+)/g;
111 }108 }
112 elsif ( $lineno == 5 ) { # strings109 elsif ( $lineno == 5 ) { # strings
113110
=== modified file 'plugin/query_log/tests/r/check_query_log_attribute.result'
--- plugin/query_log/tests/r/check_query_log_attribute.result 2011-05-15 17:58:28 +0000
+++ plugin/query_log/tests/r/check_query_log_attribute.result 2011-09-18 20:15:24 +0000
@@ -9,6 +9,6 @@
9schema=test9schema=test
10session_id=110session_id=1
11session_time=1.23456711session_time=1.234567
12start_ts=1234-56-78T90:12:34.567890
12tmp_tables=513tmp_tables=5
13ts=1234-56-78T90:12:34.567890
14warnings=614warnings=6
1515
=== modified file 'plugin/query_log/tests/r/file.result'
--- plugin/query_log/tests/r/file.result 2011-08-03 16:10:06 +0000
+++ plugin/query_log/tests/r/file.result 2011-09-18 20:15:24 +0000
@@ -21,14 +21,14 @@
21SELECT @@query_log_enabled, @@query_log_file_enabled;21SELECT @@query_log_enabled, @@query_log_file_enabled;
22@@query_log_enabled @@query_log_file_enabled22@@query_log_enabled @@query_log_file_enabled
231 1231 1
24# 0000-00-00T00:00:00.00000024# start_ts=0-00-00T00:00:00.000000
25# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=025# 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.00000026# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
27# error=false27# error=false
28# schema="test"28# schema="test"
29SET GLOBAL query_log_file_enabled=TRUE;29SET GLOBAL query_log_file_enabled=TRUE;
30#30#
31# 0000-00-00T00:00:00.00000031# start_ts=0-00-00T00:00:00.000000
32# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=032# 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.00000033# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
34# error=false34# error=false
@@ -42,14 +42,14 @@
42SELECT 2;42SELECT 2;
432432
442442
45# 0000-00-00T00:00:00.00000045# start_ts=0-00-00T00:00:00.000000
46# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=046# 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.00000047# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
48# error=false48# error=false
49# schema="test"49# schema="test"
50SET GLOBAL query_log_file_enabled=TRUE;50SET GLOBAL query_log_file_enabled=TRUE;
51#51#
52# 0000-00-00T00:00:00.00000052# start_ts=0-00-00T00:00:00.000000
53# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=053# 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.00000054# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
55# error=false55# error=false
@@ -71,14 +71,14 @@
71this is the second log file71this is the second log file
72this is the second log file72this is the second log file
73Log file exists73Log file exists
74# 0000-00-00T00:00:00.00000074# start_ts=0-00-00T00:00:00.000000
75# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=075# 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.00000076# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
77# error=false77# error=false
78# schema="test"78# schema="test"
79SET GLOBAL query_log_file_enabled=TRUE;79SET GLOBAL query_log_file_enabled=TRUE;
80#80#
81# 0000-00-00T00:00:00.00000081# start_ts=0-00-00T00:00:00.000000
82# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=082# 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.00000083# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
84# error=false84# error=false
@@ -93,49 +93,49 @@
93SELECT 'this is the third log file';93SELECT 'this is the third log file';
94this is the third log file94this is the third log file
95this is the third log file95this is the third log file
96# 0000-00-00T00:00:00.00000096# start_ts=0-00-00T00:00:00.000000
97# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=097# 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.00000098# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
99# error=false99# error=false
100# schema="third-log-file"100# schema="third-log-file"
101SET GLOBAL query_log_file="third-log-file";101SET GLOBAL query_log_file="third-log-file";
102#102#
103# 0000-00-00T00:00:00.000000103# start_ts=0-00-00T00:00:00.000000
104# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0104# 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.000000105# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
106# error=false106# error=false
107# schema="third-log-file"107# schema="third-log-file"
108SELECT @@query_log_enabled, @@query_log_file_enabled, @@query_log_file;108SELECT @@query_log_enabled, @@query_log_file_enabled, @@query_log_file;
109#109#
110# 0000-00-00T00:00:00.000000110# start_ts=0-00-00T00:00:00.000000
111# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0111# 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.000000112# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
113# error=false113# error=false
114# schema="third-log-file"114# schema="third-log-file"
115SELECT 'this is the third log file';115SELECT 'this is the third log file';
116#116#
117# 0000-00-00T00:00:00.000000117# start_ts=0-00-00T00:00:00.000000
118# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0118# 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.000000119# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
120# error=false120# error=false
121# schema="test"121# schema="test"
122SET GLOBAL query_log_file_enabled=TRUE;122SET GLOBAL query_log_file_enabled=TRUE;
123#123#
124# 0000-00-00T00:00:00.000000124# start_ts=0-00-00T00:00:00.000000
125# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0125# 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.000000126# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
127# error=false127# error=false
128# schema="test"128# schema="test"
129SELECT @@query_log_enabled, @@query_log_file_enabled;129SELECT @@query_log_enabled, @@query_log_file_enabled;
130#130#
131# 0000-00-00T00:00:00.000000131# start_ts=0-00-00T00:00:00.000000
132# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0132# 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.000000133# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
134# error=false134# error=false
135# schema="test"135# schema="test"
136SET GLOBAL query_log_file_enabled=TRUE;136SET GLOBAL query_log_file_enabled=TRUE;
137#137#
138# 0000-00-00T00:00:00.000000138# start_ts=0-00-00T00:00:00.000000
139# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0139# 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.000000140# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
141# error=false141# error=false
@@ -144,7 +144,7 @@
144#144#
145SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query.log";145SET GLOBAL query_log_file="DRIZZLETEST_VARDIR/query.log";
146Checking attributes and values of query SELECT DATE(NOW());146Checking attributes and values of query SELECT DATE(NOW());
147ts value matches OK147start_ts value matches OK
148Checking attributes and values of query SELECT DATE(NOW());148Checking attributes and values of query SELECT DATE(NOW());
149execution_time value matches OK149execution_time value matches OK
150lock_time value matches OK150lock_time value matches OK
151151
=== modified file 'plugin/query_log/tests/r/thresholds.result'
--- plugin/query_log/tests/r/thresholds.result 2011-08-03 16:10:06 +0000
+++ plugin/query_log/tests/r/thresholds.result 2011-09-18 20:15:24 +0000
@@ -26,7 +26,7 @@
26Checking attributes and values of query SELECT SLEEP(0.5);26Checking attributes and values of query SELECT SLEEP(0.5);
27arg value equals SELECT SLEEP(0.5); OK27arg value equals SELECT SLEEP(0.5); OK
2828
29# 0000-00-00T00:00:00.00000029# start_ts=0-00-00T00:00:00.000000
30# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=030# 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.00000031# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
32# error=false32# error=false
@@ -45,7 +45,7 @@
45Checking attributes and values of query SELECT 'one';45Checking attributes and values of query SELECT 'one';
46arg value equals SELECT 'one'; OK46arg value equals SELECT 'one'; OK
4747
48# 0000-00-00T00:00:00.00000048# start_ts=0-00-00T00:00:00.000000
49# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=049# session_id=0 query_id=0 rows_examined=0 rows_sent=0 tmp_tables=0 warnings=0
50# execution_time=0.000000 lock_time=0.000000 session_time=0.00000050# execution_time=0.000000 lock_time=0.000000 session_time=0.000000
51# error=false51# error=false
5252
=== modified file 'plugin/query_log/tests/samples/sample-event.log'
--- plugin/query_log/tests/samples/sample-event.log 2011-05-15 17:58:28 +0000
+++ plugin/query_log/tests/samples/sample-event.log 2011-09-18 20:15:24 +0000
@@ -1,4 +1,4 @@
1# 1234-56-78T90:12:34.5678901# start_ts=1234-56-78T90:12:34.567890
2# session_id=1 query_id=2 rows_examined=3 rows_sent=4 tmp_tables=5 warnings=62# session_id=1 query_id=2 rows_examined=3 rows_sent=4 tmp_tables=5 warnings=6
3# execution_time=7.890123 lock_time=4.567890 session_time=1.2345673# execution_time=7.890123 lock_time=4.567890 session_time=1.234567
4# error=false4# error=false
55
=== modified file 'plugin/query_log/tests/t/file.test'
--- plugin/query_log/tests/t/file.test 2011-08-03 16:10:06 +0000
+++ plugin/query_log/tests/t/file.test 2011-09-18 20:15:24 +0000
@@ -100,7 +100,7 @@
100# YYYY-MM-DDTHH:MM:SS.uuuuuu. We just check that the start of the ts100# YYYY-MM-DDTHH:MM:SS.uuuuuu. We just check that the start of the ts
101# matches today's date.101# matches today's date.
102let $today= `SELECT DATE(NOW())`;102let $today= `SELECT DATE(NOW())`;
103--exec $TOP_SRCDIR/plugin/query_log/tests/check-query-log-attribute.pl $DRIZZLETEST_VARDIR/query.log ts matches "^$today"103--exec $TOP_SRCDIR/plugin/query_log/tests/check-query-log-attribute.pl $DRIZZLETEST_VARDIR/query.log start_ts matches "^$today"
104104
105# The 3rd line of an event should be microsecond times like 1.123456105# The 3rd line of an event should be microsecond times like 1.123456
106--exec $TOP_SRCDIR/plugin/query_log/tests/check-query-log-attribute.pl $DRIZZLETEST_VARDIR/query.log execution_time,lock_time,session_time matches '\d\.\d{6}','\d\.\d{6}','\d\.\d{6}'106--exec $TOP_SRCDIR/plugin/query_log/tests/check-query-log-attribute.pl $DRIZZLETEST_VARDIR/query.log execution_time,lock_time,session_time matches '\d\.\d{6}','\d\.\d{6}','\d\.\d{6}'