1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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
This commit is contained in:
Michael Widenius
2014-03-28 09:31:24 +02:00
parent c386daf0c0
commit 10ae6e35d0
10 changed files with 222 additions and 23 deletions

View File

@ -871,12 +871,12 @@ The following options may be given as the first argument:
--slave-compressed-protocol
Use compression on master/slave protocol
--slave-ddl-exec-mode=name
Modes for how replication events should be executed.
Legal values are STRICT and IDEMPOTENT (default). In
IDEMPOTENT mode, replication will not stop for DDL
operations that are idempotent. This means that CREATE
TABLE is treated CREATE TABLE OR REPLACE and DROP TABLE
is threated as DROP TABLE IF EXISTS.
How replication events should be executed. Legal values
are STRICT and IDEMPOTENT (default). In IDEMPOTENT mode,
replication will not stop for DDL operations that are
idempotent. This means that CREATE TABLE is treated as
CREATE TABLE OR REPLACE and DROP TABLE is treated as DROP
TABLE IF EXISTS.
--slave-domain-parallel-threads=#
Maximum number of parallel threads to use on slave for
events in a single replication domain. When using
@ -886,14 +886,13 @@ The following options may be given as the first argument:
as many threads as it wants, up to the value of
slave_parallel_threads.
--slave-exec-mode=name
Modes for how replication events should be executed.
Legal values are STRICT (default) and IDEMPOTENT. In
IDEMPOTENT mode, replication will not stop for operations
that are idempotent. For example, in row based
replication attempts to delete rows that doesn't exist
will be ignored.In STRICT mode, replication will stop on
any unexpected difference between the master and the
slave
How replication events should be executed. Legal values
are STRICT (default) and IDEMPOTENT. In IDEMPOTENT mode,
replication will not stop for operations that are
idempotent. For example, in row based replication
attempts to delete rows that doesn't exist will be
ignored. In STRICT mode, replication will stop on any
unexpected difference between the master and the slave
--slave-load-tmpdir=name
The location where the slave should put its temporary
files when replicating a LOAD DATA INFILE command