Description:
Running mysqlslap with the --engine option against a master/slave replication leaves the slave with the default storage engine.
This is due to that the create table statement does not contain the storage engine. The storage engine is only set as "set storage_engine = <storage_engine>".
How to repeat:
Setup a simple master/slave replication and run mysqlslap with an --engine option other than the default storage engine.
The table created by mysqlslap will have different storage engine types on master and slave.
Suggested fix:
=== modified file 'client/mysqlslap.c'
--- client/mysqlslap.c 2009-04-25 10:05:32 +0000
+++ client/mysqlslap.c 2009-08-28 04:25:56 +0000
@@ -880,6 +880,12 @@
}
dynstr_append(&table_string, ")");
+
+ if (default_engine) {
+ dynstr_append(&table_string, " Engine = ");
+ dynstr_append(&table_string, default_engine);
+ }
+
ptr= (statement *)my_malloc(sizeof(statement),
MYF(MY_ZEROFILL|MY_FAE|MY_WME));
ptr->string = (char *)my_malloc(table_string.length+1,