From 10ae6e35d0fa69f0827324ac15750ee7bbdb78c8 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 28 Mar 2014 09:31:24 +0200 Subject: Fixed that the we don't change CREATE to CREATE OR REPLACE, except if the slave removed an existing table as part of CREATE. This will help the following replicaition scenario: MariaDB 10.0 master (statement replication) -> MariaDB 10.0 slave (row based replication) -> MySQL or MariaDB 5.x slave mysql-test/r/mysqld--help.result: Updated help text mysql-test/suite/rpl/r/create_or_replace_mix.result: Added more tests mysql-test/suite/rpl/r/create_or_replace_row.result: Added more tests mysql-test/suite/rpl/r/create_or_replace_statement.result: Added more tests mysql-test/suite/rpl/t/create_or_replace.inc: Added more tests sql/handler.h: Added org_options so that we can detect what come from the query and what was possible added later. sql/sql_insert.cc: Only write CREATE OR REPLACE if was originally specified or if we delete a conflicting table as part of create sql/sql_parse.cc: Remember orginal create options sql/sql_table.cc: Only write CREATE OR REPLACE if was originally specified or if we delete a conflicting table as part of create sql/sys_vars.cc: Updated help text --- sql/sql_parse.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_parse.cc') diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e0b205c40c6..6a5073be3a7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2893,6 +2893,7 @@ case SQLCOM_PREPARE: CREATE TABLE OR EXISTS failures by dropping the table and retrying the create. */ + create_info.org_options= create_info.options; if (thd->slave_thread && slave_ddl_exec_mode_options == SLAVE_EXEC_MODE_IDEMPOTENT && !(lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS)) -- cgit v1.2.1