[Maria-developers] Rev 2720: Fix for in file:///Users/hakan/work/monty_program/maria/
At file:///Users/hakan/work/monty_program/maria/ ------------------------------------------------------------ revno: 2720 revision-id: hakan@askmonty.org-20090902214617-5aljfm0c229hzdpu parent: knielsen@knielsen-hq.org-20090805072137-wg97dcem1cxnzt3p committer: Hakan Kuecuekyilmaz <hakan@askmonty.org> branch nick: maria timestamp: Wed 2009-09-02 23:46:17 +0200 message: Fix for mysqlslap: setting --engine does not get replicated http://bugs.mysql.com/bug.php?id=46967 Problem was that a "set storage_engine = <storage_engine>" is not replicated. Fixed by adding an explicit Engine = <storage_engine> to the build_table_string() function. Open question: Should MySQL's replication actually replicate the set storage_engine command or not? Answer: no it should not (documented). === modified file 'client/mysqlslap.c' --- a/client/mysqlslap.c 2009-04-25 10:05:32 +0000 +++ b/client/mysqlslap.c 2009-09-02 21:46:17 +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,
Hakan Kuecuekyilmaz пишет:
At file:///Users/hakan/work/monty_program/maria/
------------------------------------------------------------ revno: 2720 revision-id: hakan@askmonty.org-20090902214617-5aljfm0c229hzdpu parent: knielsen@knielsen-hq.org-20090805072137-wg97dcem1cxnzt3p committer: Hakan Kuecuekyilmaz <hakan@askmonty.org> branch nick: maria timestamp: Wed 2009-09-02 23:46:17 +0200 message: Fix for mysqlslap: setting --engine does not get replicated http://bugs.mysql.com/bug.php?id=46967
Problem was that a "set storage_engine = <storage_engine>" is not replicated.
Fixed by adding an explicit Engine = <storage_engine>
to the build_table_string() function.
Open question: Should MySQL's replication actually replicate the set storage_engine command or not? Answer: no it should not (documented).
The correct question is should be default engine be replicated as 'default' or as certain engine. I think it should be 'default' (it seems logical for me and gives more space for different setup of master/slave).
=== modified file 'client/mysqlslap.c' --- a/client/mysqlslap.c 2009-04-25 10:05:32 +0000 +++ b/client/mysqlslap.c 2009-09-02 21:46:17 +0000 @@ -880,6 +880,12 @@ }
dynstr_append(&table_string, ")"); + + if (default_engine) {
Move above { on a new line, This program should follow mysql code style.
+ 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,
participants (2)
-
Hakan Kuecuekyilmaz
-
Oleksandr "Sanja" Byelkin