mysqlslap adds '\0' symbol in the end of autogenerated CREATE TABLE statement
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
Triaged
|
Medium
|
Unassigned | |||
5.7 |
Triaged
|
Medium
|
Unassigned |
Bug Description
Description:
mysqlslap adds extra '\0' symbol in the end of the autogenerated CREATE TABLE statement
How to repeat:
1. Start server with binary log enabled, for example, from mysql-test:
./mtr --start alias --mysqld=
2. Run mysqlslap with --auto-generate-sql option:
../bin/mysqlslap -h127.0.0.1 -P13000 -uroot --concurrency=50 --iterations=200 --number-int-cols=2 --number-
3. Check binary log content:
$../bin/mysqlbinlog var/mysqld.
...
# at 510
#160105 22:54:37 server id 1 end_log_pos 575 CRC32 0x53f2e1e5 Anonymous_GTID last_committed=2 sequence_number=3
SET @@SESSION.
# at 575
#160105 22:54:37 server id 1 end_log_pos 779 CRC32 0x3cecd4a0 Query thread_id=33812 exec_time=0 error_code=0
use `mysqlslap`/*!*/;
SET TIMESTAMP=
CREATE TABLE `t1` (intcol1 INT(32) ,intcol2 INT(32) ,charcol1 VARCHAR(
/*!*/;
4. Try to import data into test database:
$../bin/mysqlbinlog var/mysqld.
ERROR at line 45: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query: 'CREATE TABLE `t1` (intcol1 INT(32) ,intcol2 INT(32) ,charcol1 VARCHAR(
Suggested fix:
Don't add extra character in the end of auto-generated CREATE TABLE statement.
tags: | added: upstream |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-1688