Description:
mysqlslap's --auto-generate-sql feature is not compatible with lower mysql version which not support SQL keys: SCHEMA, storage_engine, serial
How to repeat:
mysql> select version();
+------------------+
| version() |
+------------------+
| 4.0.16-debug-log |
+------------------+
1 row in set (0.00 sec)
command:
mysqlslap --auto-generate-sql --user=root --auto-generate-sql-load-type=write --auto-generate-sql-add-autoincrement --concurrency=100 --engine=innodb --iterations=1 --debug-info
--results:
mysqlslap: Cannot drop database 'mysqlslap' 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 'SCHEMA IF EXISTS `mysqlslap`' at line 1
mysqlslap: Cannot set default engine: Unknown system variable 'storage_engine'
mysqlslap: Cannot run query CREATE TABLE `t1` (id serial,intcol1 INT(32) ,charcol1 VARCHAR(128)) 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 'serial,intcol1 INT(32) ,charcol1 VARCHAR(128))' at line 1
Suggested fix:
check server version or use compatible sql