playback doesn't handle multi-line queries in slow log

Bug #1072902 reported by Gavin Towey
This bug report is a duplicate of:  Bug #1035217: multi-lines queries don't work. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MOVED - Percona Playback
New
Undecided
Unassigned

Bug Description

If you send a query to mysql with newlines in the query string, mysql will write the query across multiple lines. However, playback seems to assume that each line is a full query:

Take this sample slow log:
/usr/sbin/mysqld, Version: 5.5.13-55-log (Percona Server (GPL), Release rel20.4, Revision 138). started with:
Tcp port: 3306 Unix socket: /dbname/mysql/app/mysql.sock
Time Id Command Argument
# User@Host: dbuser[dbuser] @ [127.0.0.1]
# Thread_id: 166047072 Schema: dbname Last_errno: 0 Killed: 0
# Query_time: 0.000102 Lock_time: 0.000031 Rows_sent: 1 Rows_examined: 1 Rows_affected: 0 Rows_read: 1
# Bytes_sent: 102 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
# InnoDB_trx_id: 197B13D5A3
# 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
# InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
# InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000
# InnoDB_pages_distinct: 4
SET timestamp=1351535810;
SELECT
 column
FROM
 table
WHERE foo=1

Running that file through the program generates these errors:
Database Plugin: libmysqlclient
 Running...
Error query: SELECT

Connection 166047072 Rows Sent: 0 != expected 1 for query: SELECT

Error query: column

Connection 166047072 Rows Sent: 0 != expected 1 for query: column

Error query: FROM

Connection 166047072 Rows Sent: 0 != expected 1 for query: FROM

Error query: table

Connection 166047072 Rows Sent: 0 != expected 1 for query: table

Error query: WHERE foo=1

Connection 166047072 Rows Sent: 0 != expected 1 for query: WHERE foo=1

Revision history for this message
Gavin Towey (gtowey) wrote :

just realized that this is a dupe of:
https://bugs.launchpad.net/percona-playback/+bug/1035217

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.