Bug #46967 mysqlslap: setting --engine does not get replicated
| Submitted: | 28 Aug 2009 4:43 | Modified: | 28 Aug 2009 5:24 |
|---|---|---|---|
| Reporter: | Hakan Küçükyılmaz | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | Tools | Severity: | S2 (Serious) |
| Version: | 5.0, 5.1 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Contribution | ||
[28 Aug 2009 5:24]
Sveta Smirnova
Thank you for the report. Verified as described.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
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,