Wrong Query logged in case of parse error

Bug #716210 reported by Peter Zaitsev on 2011-02-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Oleg Tsarev
5.1
Fix Released
Medium
Oleg Tsarev
5.5
Fix Released
Medium
Oleg Tsarev

Bug Description

It looks like some variables are not cleared in Percona Server 12.5 with logging:

mysql> create table zzz(i int);
ERROR 1050 (42S01): Table 'zzz' already exists

In the slow query log we have:

# Time: 110207 4:16:27.0000239554
# User@Host: root[root] @ localhost []
# Thread_id: 38 Schema: test Last_errno: 1050 Killed: 0
# Query_time: 0.000238 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 Rows_affected: 0 Rows_read: 1
# Bytes_sent: 39 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: No Filesort_on_disk: No Merge_passes: 0
# No InnoDB statistics available for this query
SET timestamp=1297080987;
create table zzz(i int);
# Time: 110207 4:16:28.0000532378
# User@Host: root[root] @ localhost []
# Thread_id: 38 Schema: test Last_errno: 1050 Killed: 0
# Query_time: 0.000038 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 Rows_affected: 0 Rows_read: 1
# Bytes_sent: 39 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# QC_Hit: No Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
# Filesort: No Filesort_on_disk: No Merge_passes: 0
# No InnoDB statistics available for this query
SET timestamp=1297080988;
# administrator command: Quit;

Note Last_errno is reported 1050 for administrator command: Quit

Config file:

log_slow_queries
enable_query_response_time_stats=1
userstat_running=1
use_global_long_query_time=1
log_slow_slave_statements=1
log_slow_verbosity=full
log_slow_admin_statements=1
slow_query_log_microseconds_timestamp=1
log_slow_timestamp_every=1
long_query_time=0

Related branches

Stewart Smith (stewart) wrote :

would be great to have own .test file for this.

Changed in percona-server:
assignee: nobody → Valentine Gostev (core-longbow)
Oleg Tsarev (tsarev) on 2011-06-28
Changed in percona-server:
assignee: Valentine Gostev (longbow) → Oleg Tsarev (tsarev)
status: New → In Progress
Oleg Tsarev (tsarev) wrote :

Valentin, please provide test-case for this

Valentine Gostev (longbow) wrote :

Linked branch contains MTR test in slow_extended.patch

Valentine Gostev (longbow) wrote :

Problem not reproduced on 5.5 as originally described (will be a separate bug)

Valentine Gostev (longbow) wrote :
tags: added: slow-extended
Oleg Tsarev (tsarev) wrote :

Please get lp:~tsarev/percona-server/test55_830199 for bug reproducing (fix of bug #830199 requires)

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1188

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers