I'm having a problem passing preexisting files full of SQL statements into mysqlslap.
For example, I have a file named
create.sql that contains my table structure (as dumped by
mysqldump), with normal ; delimiting.
I also have a file called
slap.sql (actually a slightly munged general-log-file, but this is a tiny example that reproduces the error) that contains
INSERT INTO comments VALUES ("I like winks ;) and frowns :(");
And I run:
mysqlslap --delimiter=";" --create create.sql --query thing.sql
I get the error:
mysqlslap: Cannot run query INSERT INTO comments VALUES ("I like winks
ERROR : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"I like winks' at line 1
Which is consistent with MySQL terminating the statement at the ; that's in the middle of a string.
What can I do to make mysqlslap take
--create data from mysqldump and not hork on semicolons embedded in strings in the
--query data? Is it possible that mysqlslap does not follow normal parsing rules when you pass a file in to the --query parameter?