summaryrefslogtreecommitdiff
path: root/mysql-test/extra
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/extra')
-rw-r--r--mysql-test/extra/binlog_tests/binlog.test9
-rw-r--r--mysql-test/extra/binlog_tests/database.test2
-rw-r--r--mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_auto_increment.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ddl.test9
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extra_col_slave.test8
-rw-r--r--mysql-test/extra/rpl_tests/rpl_foreign_key.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test290
-rw-r--r--mysql-test/extra/rpl_tests/rpl_innodb.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_loadfile.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_mixing_engines.test7
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test119
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test347
-rw-r--r--mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test307
-rw-r--r--mysql-test/extra/rpl_tests/rpl_partition.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_blob.test8
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_func003.test3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_img.test241
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_img_blobs.test179
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_sp003.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_sv_relay_space.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_trig004.test6
22 files changed, 446 insertions, 1111 deletions
diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test
index ce5dde97894..831c6c886d5 100644
--- a/mysql-test/extra/binlog_tests/binlog.test
+++ b/mysql-test/extra/binlog_tests/binlog.test
@@ -372,7 +372,8 @@ dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
SELECT * FROM t1;
--echo # Their values should be ON
-SHOW SESSION VARIABLES LIKE "%_checks";
+SHOW SESSION VARIABLES LIKE "foreign_key_checks";
+SHOW SESSION VARIABLES LIKE "unique_checks";
--echo
SET @@SESSION.foreign_key_checks= OFF;
@@ -387,7 +388,8 @@ dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
SELECT * FROM t1;
--echo # Their values should be OFF
-SHOW SESSION VARIABLES LIKE "%_checks";
+SHOW SESSION VARIABLES LIKE "foreign_key_checks";
+SHOW SESSION VARIABLES LIKE "unique_checks";
--echo # INSERT INTO t1 VALUES(2)
--echo # foreign_key_checks=1 and unique_checks=1
@@ -401,7 +403,8 @@ dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
SELECT * FROM t1;
--echo # Their values should be OFF
-SHOW SESSION VARIABLES LIKE "%_checks";
+SHOW SESSION VARIABLES LIKE "foreign_key_checks";
+SHOW SESSION VARIABLES LIKE "unique_checks";
DROP TABLE t1;
diff --git a/mysql-test/extra/binlog_tests/database.test b/mysql-test/extra/binlog_tests/database.test
index 82e8b396357..6b3da087f01 100644
--- a/mysql-test/extra/binlog_tests/database.test
+++ b/mysql-test/extra/binlog_tests/database.test
@@ -84,7 +84,7 @@ CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
engine=innodb;
RESET MASTER;
---error ER_ROW_IS_REFERENCED
+--error ER_ROW_IS_REFERENCED_2
DROP DATABASE db1; # Fails because of the fk
SHOW TABLES FROM db1; # t1 was dropped, t2 remains
--source include/show_binlog_events.inc # Check that the binlog drops t1
diff --git a/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc b/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
index 95440ab04a0..1cc850091fe 100644
--- a/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
+++ b/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc
@@ -16,6 +16,7 @@
#
--source include/have_log_bin.inc
+set sql_mode="";
SET NAMES 'utf8';
#SHOW VARIABLES LIKE 'character_set%';
@@ -76,7 +77,7 @@ eval CREATE TABLE t1 (
#
c28 DATE,
c29 DATETIME,
- c30 TIMESTAMP,
+ c30 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
c31 TIME,
c32 YEAR,
#
diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test
index 8cd86de8040..67286c37258 100644
--- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test
+++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test
@@ -1,7 +1,6 @@
#
# Test of auto_increment with offset
#
--- source include/not_ndb_default.inc
-- source include/master-slave.inc
eval create table t1 (a int not null auto_increment,b int, primary key (a)) engine=$engine_type2 auto_increment=3;
diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test
index 8c35ff974d8..21778a11df5 100644
--- a/mysql-test/extra/rpl_tests/rpl_ddl.test
+++ b/mysql-test/extra/rpl_tests/rpl_ddl.test
@@ -128,6 +128,8 @@
###############################################################
# Some preparations
###############################################################
+set global sql_mode='';
+set local sql_mode='';
# The sync_slave_with_master is needed to make the xids deterministic.
sync_slave_with_master;
@@ -146,13 +148,10 @@ eval CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE=$engine_type;
# Prevent Bug#26687 rpl_ddl test fails if run with --innodb option
# The testscript (suite/rpl/rpl_ddl.test) + the expected result need that the
# slave uses MyISAM for the table mysqltest.t1.
-# This is not valid in case of suite/rpl_ndb/rpl_ndb_ddl.test which sources
-# also this script.
sync_slave_with_master;
connection slave;
if (`SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
- WHERE TABLE_SCHEMA = 'mysqltest1' AND TABLE_NAME = 't1'
- AND ENGINE <> 'MyISAM' AND '$engine_type' <> 'NDB'`)
+ WHERE TABLE_SCHEMA = 'mysqltest1' AND TABLE_NAME = 't1' AND ENGINE <> 'MyISAM'`)
{
skip This test needs on slave side: InnoDB disabled, default engine: MyISAM;
}
@@ -612,3 +611,5 @@ DROP TEMPORARY TABLE mysqltest1.t22;
DROP DATABASE mysqltest1;
# mysqltest2 was alreday DROPPED some tests before.
DROP DATABASE mysqltest3;
+
+set global sql_mode=default;
diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
index 7dcb9e2725c..47d75c0d0b2 100644
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
@@ -395,13 +395,11 @@ sync_slave_with_master;
###############################################################
# Error reaction is up to sql_mode of the slave sql (bug#38173)
#--echo *** Create t9 on slave ***
-# Please, check BUG#47741 to see why you are not testing NDB.
-if (`SELECT UPPER(LEFT($engine_type, 3)) != 'NDB'`)
-{
STOP SLAVE;
RESET SLAVE;
eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5),
- d TIMESTAMP,
+ d TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+ ON UPDATE CURRENT_TIMESTAMP,
e INT NOT NULL,
f text not null,
g text,
@@ -446,8 +444,6 @@ if (`SELECT UPPER(LEFT($engine_type, 3)) != 'NDB'`)
DROP TABLE t9;
sync_slave_with_master;
-}
-
############################################
# More columns in slave at middle of table #
# Expect: Proper error message #
diff --git a/mysql-test/extra/rpl_tests/rpl_foreign_key.test b/mysql-test/extra/rpl_tests/rpl_foreign_key.test
index db646a736f9..d10deece1b1 100644
--- a/mysql-test/extra/rpl_tests/rpl_foreign_key.test
+++ b/mysql-test/extra/rpl_tests/rpl_foreign_key.test
@@ -21,9 +21,7 @@ connection master;
SET TIMESTAMP=1000000000;
CREATE TABLE t3 ( a INT UNIQUE );
SET FOREIGN_KEY_CHECKS=0;
-# Had to add 1022 for run with ndb as ndb uses different
-# error and error code for error ER_DUP_ENTRY. Bug 16677
---error 1022, ER_DUP_ENTRY
+--error ER_DUP_ENTRY
INSERT INTO t3 VALUES (1),(1);
sync_slave_with_master;
diff --git a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
index 765757c3427..ed758313770 100644
--- a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
+++ b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
@@ -64,22 +64,6 @@ while ($ddl_cases >= 1)
{
let $commit_event_row_number= 4;
}
- #
- # In NDB (RBR and MIXED modes), the commit event is usually the seventh event
- # in the binary log:
- #
- # 1: COMMAND
- # 2: BEGIN
- # 3: TABLE MAP EVENT
- # 4: TABLE MAP EVENT (ndb_apply_status)
- # 5: ROW EVENT
- # 6: ROW EVENT
- # 7: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 7;
- }
let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1);
--enable_query_log
@@ -96,32 +80,10 @@ while ($ddl_cases >= 1)
if ($ddl_cases == 41)
{
let $cmd= LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES;
- if ($engine == NDB)
- {
- # This seems to be related to epochs.
- # We need to check this against an updated version or avoid it.
- let $ok= no;
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 40)
{
let $cmd= LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 39)
{
@@ -130,21 +92,6 @@ while ($ddl_cases >= 1)
if ($ddl_cases == 38)
{
let $cmd= CHECK TABLE nt_1;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 37)
{
@@ -157,40 +104,10 @@ while ($ddl_cases >= 1)
if ($ddl_cases == 35)
{
let $cmd= LOCK TABLES tt_1 WRITE;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 34)
{
let $cmd= UNLOCK TABLES;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 33)
{
@@ -203,42 +120,6 @@ while ($ddl_cases >= 1)
if ($ddl_cases == 31)
{
let $cmd= SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass');
- #
- # In NDB (RBR mode), the commit event is the eleventh event
- # in the binary log:
- #
- # 1: DDL EVENT which triggered the previous commmit.
- # 2: BEGIN
- # 3: TABLE MAP EVENT
- # 4: ROW EVENT
- # 5: COMMIT
- # 6: BEGIN
- # 7: TABLE MAP EVENT
- # 8: TABLE MAP EVENT (ndb_apply_status)
- # 9: ROW EVENT
- # 10: ROW EVENT
- # 11: COMMIT
- #
- if (`SELECT '$engine' = 'NDB' && @@binlog_format = 'ROW'`)
- {
- let $commit_event_row_number= 11;
- }
- #
- # In NDB (MIXED mode), the commit event is the eighth event
- # in the binary log:
- #
- # 1: DDL EVENT which triggered the previous commmit.
- # 2: BEGIN
- # 3: TABLE MAP EVENT
- # 4: TABLE MAP EVENT (ndb_apply_status)
- # 5: ROW EVENT
- # 6: ROW EVENT
- # 7: COMMIT
- #
- if (`SELECT '$engine' = 'NDB' && @@binlog_format != 'ROW'`)
- {
- let $commit_event_row_number= 7;
- }
}
if ($ddl_cases == 30)
{
@@ -281,7 +162,7 @@ while ($ddl_cases >= 1)
# 5: COMMIT
# 6: DDL EVENT which triggered the previous commmit.
#
- if (`select @@binlog_format = 'ROW' && '$engine' != 'NDB'`)
+ if (`select @@binlog_format = 'ROW'`)
{
let $commit_event_row_number= 5;
}
@@ -325,42 +206,10 @@ while ($ddl_cases >= 1)
if ($ddl_cases == 13)
{
let $cmd= CREATE INDEX ix ON tt_1(ddl_case);
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- # 7: DDL EVENT which triggered the previous commmit.
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 12)
{
let $cmd= DROP INDEX ix ON tt_1;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- # 7: DDL EVENT which triggered the previous commmit.
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 11)
{
@@ -386,39 +235,6 @@ while ($ddl_cases >= 1)
{
let $commit_event_row_number= 4;
}
- #
- # In NDB (RBR mode), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if (`SELECT '$engine' = 'NDB' && @@binlog_format = 'ROW'` )
- {
- let $commit_event_row_number= 6;
- }
- #
- # In NDB (MIXED mode), the commit event is the nineth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: DDL EVENT which triggered the previous commmit.
- # 3: COMMIT
- # 4: BEGIN
- # 5: TABLE MAP EVENT
- # 6: TABLE MAP EVENT (ndb_apply_status)
- # 7: ROW EVENT
- # 8: ROW EVENT
- # 9: COMMIT
- #
- if (`SELECT '$engine' = 'NDB' && @@binlog_format != 'ROW'` )
- {
- let $commit_event_row_number= 9;
- }
}
if ($ddl_cases == 10)
{
@@ -436,21 +252,6 @@ while ($ddl_cases >= 1)
{
let $commit_event_row_number= 4;
}
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 9)
{
@@ -468,21 +269,6 @@ while ($ddl_cases >= 1)
{
let $commit_event_row_number= 4;
}
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 8)
{
@@ -507,7 +293,7 @@ while ($ddl_cases >= 1)
# 3: ROW EVENT
# 4: COMMIT
#
- if (`select @@binlog_format = 'STATEMENT'`)
+ if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'ROW'`)
{
let $commit_event_row_number= 4;
}
@@ -516,49 +302,13 @@ while ($ddl_cases >= 1)
# 1: BEGIN
# 2: TABLE MAP EVENT
# 3: ROW EVENT
- # 4: DROP TEMPORARY table IF EXISTS
+ # 4: DROP TEMPORARY
# 5: COMMIT
#
- if (`select @@binlog_format = 'MIXED' || @@binlog_format = 'ROW'`)
+ if (`select @@binlog_format = 'MIXED'`)
{
let $commit_event_row_number= 5;
}
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: DROP TEMPORARY table IF EXISTS
- # 3: COMMIT
- # 4: BEGIN
- # 5: TABLE MAP EVENT
- # 6: TABLE MAP EVENT (ndb_apply_status)
- # 7: ROW EVENT
- # 8: ROW EVENT
- # 9: COMMIT
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 9;
- }
- #
- # In NDB (MIXED mode), the commit event is the nineth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: DDL EVENT which triggered the previous commmit.
- # 3: COMMIT
- # 4: BEGIN
- # 5: TABLE MAP EVENT
- # 6: TABLE MAP EVENT (ndb_apply_status)
- # 7: ROW EVENT
- # 8: ROW EVENT
- # 9: COMMIT
- #
- if (`SELECT '$engine' = 'NDB' && @@binlog_format != 'ROW'` )
- {
- let $commit_event_row_number= 9;
- }
}
if ($ddl_cases == 7)
{
@@ -583,42 +333,10 @@ while ($ddl_cases >= 1)
if ($ddl_cases == 2)
{
let $cmd= CREATE DATABASE db;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- # 7: DDL EVENT which triggered the previous commmit.
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
if ($ddl_cases == 1)
{
let $cmd= DROP DATABASE IF EXISTS db;
- #
- # In NDB (RBR and MIXED modes), the commit event is the sixth event
- # in the binary log:
- #
- # 1: BEGIN
- # 2: TABLE MAP EVENT
- # 3: TABLE MAP EVENT (ndb_apply_status)
- # 4: ROW EVENT
- # 5: ROW EVENT
- # 6: COMMIT
- # 7: DDL EVENT which triggered the previous commmit.
- #
- if ($engine == NDB)
- {
- let $commit_event_row_number= 6;
- }
}
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
--eval $cmd
diff --git a/mysql-test/extra/rpl_tests/rpl_innodb.test b/mysql-test/extra/rpl_tests/rpl_innodb.test
index 865c97cf95d..6b3732439b2 100644
--- a/mysql-test/extra/rpl_tests/rpl_innodb.test
+++ b/mysql-test/extra/rpl_tests/rpl_innodb.test
@@ -48,8 +48,6 @@ connection master;
#
#Note Matthias: to be merged to rpl_ddl.test
---source include/not_ndb_default.inc
-
FLUSH LOGS;
sync_slave_with_master;
FLUSH LOGS;
diff --git a/mysql-test/extra/rpl_tests/rpl_loadfile.test b/mysql-test/extra/rpl_tests/rpl_loadfile.test
index 85620b58a97..9073e5e3d9f 100644
--- a/mysql-test/extra/rpl_tests/rpl_loadfile.test
+++ b/mysql-test/extra/rpl_tests/rpl_loadfile.test
@@ -23,10 +23,6 @@ SELECT * FROM test.t1 ORDER BY blob_column;
save_master_pos;
sync_slave_with_master;
connection slave;
-# Need to allow some time when NDB engine is used for
-# the injector thread to have time to populate binlog
-let $wait_condition= SELECT INSTR(blob_column,'aberration') > 0 FROM test.t1 WHERE a = 2;
---source include/wait_condition.inc
SELECT * FROM test.t1 ORDER BY blob_column;
# Cleanup
diff --git a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test
index ce6dee7c62e..e4a257371a7 100644
--- a/mysql-test/extra/rpl_tests/rpl_mixing_engines.test
+++ b/mysql-test/extra/rpl_tests/rpl_mixing_engines.test
@@ -12,8 +12,7 @@
# used in the same transaction.
#
# * Statements that do an implicit commit (i.e., most but not all DDL, and
-# some utility commands) are logged specially due to unspecified requirements by
-# NDB.
+# some utility commands) are logged specially
#
# * Statements that update temporary tables need special treatment since they
# are not logged in row format.
@@ -147,9 +146,7 @@
# - Rules for committing statements, except CREATE [TEMPORARY] TABLE...SELECT
#
# * All other statements that have a pre-commit are written directly to the
-# binlog. (Note: this is semantically equivalent to writing it to the SC and
-# flushing the SC. However, due to requirements by NDB (which have not been
-# clarified), we write directly to the binlog.)
+# binlog.
#
# We use the include file rpl_mixing_engines.inc to generate sql commands from a
# format string. The format string consists of a sequence of 'codes' separated
diff --git a/mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test b/mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test
deleted file mode 100644
index 16f8116d92e..00000000000
--- a/mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test
+++ /dev/null
@@ -1,119 +0,0 @@
-#######################################
-# Author: Rafal Somla #
-# Date: 2006-08-20 #
-# Purpose: Test replication of basic #
-# table operations in various setups #
-# #
-# Based on rpl_ndb_2multi_eng.test by #
-# JBM #
-#######################################
-
---echo --- Doing pre test cleanup ---
-
-connection master;
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_query_log
-
-#################################################
---echo --- Create Table Section ---
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL,
- b1 INT,
- vc VARCHAR(255),
- bc CHAR(255),
- d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0,
- total BIGINT UNSIGNED,
- y YEAR,
- t DATE,
- PRIMARY KEY(id));
-
---echo --- Show table on master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show table on slave ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---source include/rpl_multi_engine2.inc
-
-#################################################
-# Okay lets see how it holds up to table changes
---echo --- Check that simple Alter statements are replicated correctly --
-
-ALTER TABLE t1 DROP PRIMARY KEY;
-# note: table with no PK can't contain blobs if it is to be replicated.
-ALTER TABLE t1 MODIFY vc char(32);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---source include/rpl_multi_engine2.inc
-
-#################################################
---echo --- Check that replication works when slave has more columns than master
-connection master;
-ALTER TABLE t1 ADD PRIMARY KEY(id,total);
-ALTER TABLE t1 MODIFY vc TEXT;
-
-INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ',
- 'Must make it bug free for the customer',
- 654321.4321,15.21,0,1965,"1905-11-14");
-INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ',
- 'Must make it bug free for the customer',
- 654321.4321,15.21,0,1965,"1965-11-14");
-INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ',
- 'Must make it bug free for the customer',
- 654321.4321,15.21,0,1965,"1985-11-14");
-
---echo --- Add columns on slave ---
---sync_slave_with_master
-ALTER TABLE t1 ADD (u int, v char(16) default 'default');
-UPDATE t1 SET u=7 WHERE id < 50;
-UPDATE t1 SET v='explicit' WHERE id >10;
-
---echo --- Show changed table on slave ---
-
-SHOW CREATE TABLE t1;
-SELECT *
-FROM t1
-ORDER BY id;
-
---source include/rpl_multi_engine2.inc
-TRUNCATE TABLE t1;
-
-#################################################
---echo --- Check that replication works when master has more columns than slave
-connection master;
-
---echo --- Remove columns on slave ---
---sync_slave_with_master
-ALTER TABLE t1 DROP COLUMN v;
-ALTER TABLE t1 DROP COLUMN u;
-ALTER TABLE t1 DROP COLUMN t;
-ALTER TABLE t1 DROP COLUMN y;
-
---echo --- Show changed table on slave ---
-
-SHOW CREATE TABLE t1;
-
---source include/rpl_multi_engine2.inc
-TRUNCATE TABLE t1;
-
-#################################################
---echo --- Do Cleanup --
-connection master;
-DROP TABLE IF EXISTS t1;
-
-sync_slave_with_master;
-connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test b/mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test
deleted file mode 100644
index 1677aaf8277..00000000000
--- a/mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test
+++ /dev/null
@@ -1,347 +0,0 @@
-#######################################
-# Author: JBM #
-# Date: 2006-02-23 #
-# Purpose: See if replication between #
-# NDB -> MyISAM and InnoDB works. #
-# and if #
-# MyISAM and InnoDB -> NDB works. #
-#######################################
-# By JBM #
-# Date 2006-02-28 #
-# Change: Implemented review comments #
-#######################################
-
---echo --- Doing pre test cleanup ---
-
-connection master;
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_query_log
-
---echo --- Start test 1 Basic testing ---
---echo --- Create Table Section ---
-
-#################################################
-# Requirment: Create basic table, replicate #
-# basice operations such at insert, update #
-# delete between 2 different storage engines #
-# Alter table and ensure table is handled #
-# Correctly on the slave #
-#################################################
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
- bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE,PRIMARY KEY(id));
-
---echo --- Show table on master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show table on slave ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
-# Okay lets see how it holds up to table changes
---echo --- Check that simple Alter statements are replicated correctly --
-
-ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
-ALTER TABLE t1 MODIFY vc TEXT;
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 1 Basic testing ---
---echo --- Do Cleanup --
-
-DROP TABLE IF EXISTS t1;
-
-#################################################################
-
---echo --- Start test 2 partition RANGE testing --
---echo --- Do setup --
-
-
-#################################################
-# Requirment: Create table that is partitioned #
-# by range on year i.e. year(t) and replicate #
-# basice operations such at insert, update #
-# delete between 2 different storage engines #
-# Alter table and ensure table is handled #
-# Correctly on the slave #
-#################################################
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
- bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE)
- PARTITION BY RANGE (YEAR(t))
- (PARTITION p0 VALUES LESS THAN (1901),
- PARTITION p1 VALUES LESS THAN (1946),
- PARTITION p2 VALUES LESS THAN (1966),
- PARTITION p3 VALUES LESS THAN (1986),
- PARTITION p4 VALUES LESS THAN (2005),
- PARTITION p5 VALUES LESS THAN MAXVALUE);
-
---echo --- Show table on master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show table on slave --
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
-ALTER TABLE t1 MODIFY vc TEXT;
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
---enable_query_log
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 2 partition RANGE testing ---
---echo --- Do Cleanup ---
-
-DROP TABLE IF EXISTS t1;
-
-########################################################
-
---echo --- Start test 3 partition LIST testing ---
---echo --- Do setup ---
-#################################################
-# Requirment: Create table that is partitioned #
-# by list on id i.e. (2,4). Pretend that we #
-# missed one and alter to add. Then replicate #
-# basice operations such at insert, update #
-# delete between 2 different storage engines #
-# Alter table and ensure table is handled #
-# Correctly on the slave #
-#################################################
-
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
- bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE)
- PARTITION BY LIST(id)
- (PARTITION p0 VALUES IN (2, 4),
- PARTITION p1 VALUES IN (42, 142));
-
---echo --- Test 3 Alter to add partition ---
-
-ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412));
-
---echo --- Show table on master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show table on slave ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 ADD PRIMARY KEY(id);
-ALTER TABLE t1 MODIFY vc TEXT;
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 3 partition LIST testing ---
---echo --- Do Cleanup --
-
-DROP TABLE IF EXISTS t1;
-
-########################################################
-
---echo --- Start test 4 partition HASH testing ---
---echo --- Do setup ---
-#################################################
-# Requirment: Create table that is partitioned #
-# by hash on year i.e. YEAR(t). Then replicate #
-# basice operations such at insert, update #
-# delete between 2 different storage engines #
-# Alter table and ensure table is handled #
-# Correctly on the slave #
-#################################################
-
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
- bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE)
- PARTITION BY HASH( YEAR(t) )
- PARTITIONS 4;
-
---echo --- show that tables have been created correctly ---
-
-SHOW CREATE TABLE t1;
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 ADD PRIMARY KEY(t,id);
-ALTER TABLE t1 MODIFY vc TEXT;
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 4 partition HASH testing ---
---echo --- Do Cleanup --
-
-DROP TABLE IF EXISTS t1;
-
-########################################################
-
---echo --- Start test 5 partition by key testing ---
---echo --- Create Table Section ---
-
-#################################################
-# Requirment: Create table that is partitioned #
-# by key on id with 4 parts. Then replicate #
-# basice operations such at insert, update #
-# delete between 2 different storage engines #
-# Alter table and ensure table is handled #
-# Correctly on the slave #
-#################################################
-
-CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
- bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
- f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
- y YEAR, t DATE,PRIMARY KEY(id))
- PARTITION BY KEY()
- PARTITIONS 4;
-
---echo --- Show that tables on master are ndbcluster tables ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Show that tables on slave ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
-# Okay lets see how it holds up to table changes
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still right type ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- Check that simple Alter statements are replicated correctly ---
-
-ALTER TABLE t1 MODIFY vc TEXT;
-
---echo --- Show the new improved table on the master ---
-
-SHOW CREATE TABLE t1;
-
---echo --- Make sure that our tables on slave are still same engine ---
---echo --- and that the alter statements replicated correctly ---
-
-sync_slave_with_master;
-SHOW CREATE TABLE t1;
-
---echo --- Perform basic operation on master ---
---echo --- and ensure replicated correctly ---
-
---source include/rpl_multi_engine3.inc
-
---echo --- End test 5 key partition testing ---
---echo --- Do Cleanup ---
-
-DROP TABLE IF EXISTS t1;
-sync_slave_with_master;
-
-# End of 5.1 test case
diff --git a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test b/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
deleted file mode 100644
index bba860ab9aa..00000000000
--- a/mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
+++ /dev/null
@@ -1,307 +0,0 @@
-#############################################
-#Authors: TU and Jeb
-#Date: 2007/04
-#Purpose: Generic replication to cluster
-# and ensuring that the ndb_apply_status
-# table is updated.
-#############################################
-# Notes:
-# include/select_ndb_apply_status.inc
-# Selects out the log name, start & end pos
-# from the ndb_apply_status table
-#
-# include/show_binlog_using_logname.inc
-# To select out 1 row from offset 1
-# from the start position in the binlog whose
-# name is = log_name
-#
-# include/tpcb.inc
-# Creates DATABASE tpcb, the tables and
-# stored procedures for loading the DB
-# and for running transactions against DB.
-##############################################
-
-
---echo
---echo *** Test 1 ***
---echo
-
-connection master;
-create table t1 (a int key, b int) engine innodb;
-create table t2 (a int key, b int) engine innodb;
-
---echo
-
---sync_slave_with_master
-alter table t1 engine ndb;
-alter table t2 engine ndb;
-
---echo
-
-# check binlog position without begin
-connection master;
-insert into t1 values (1,2);
-
---echo
-
---sync_slave_with_master
---source include/select_ndb_apply_status.inc
-
---echo
-
-connection master;
---echo # Now check that that is in the apply_status table is consistant
---echo # with what is in the binlog
---echo
---echo # since insert is done with transactional engine, expect a BEGIN
---echo # at <start_pos>
---echo
---let $binlog_start= $start_pos
---let $binlog_limit= 1
---source include/show_binlog_events.inc
-
---echo
---echo # Now the insert, one step after
---echo
---let $binlog_start= $start_pos
---let $binlog_limit= 1,1
---source include/show_binlog_events.inc
-
---echo
---echo # and the COMMIT should be at <end_pos>
---echo
---let $binlog_start= $start_pos
---let $binlog_limit= 2,1
---source include/show_binlog_events.inc
-
---echo
-
-# check binlog position with begin
-begin;
-insert into t1 values (2,3);
-insert into t2 values (3,4);
-commit;
-
---echo
-
---sync_slave_with_master
---source include/select_ndb_apply_status.inc
-
-connection master;
---let $binlog_start= $start_pos
---let $binlog_limit= 1
---source include/show_binlog_events.inc
---echo
---let $binlog_start= $start_pos
---let $binlog_limit= 1,2
---source include/show_binlog_events.inc
---echo
---let $binlog_start= $start_pos
---let $binlog_limit= 3,1
---source include/show_binlog_events.inc
-
---echo
-
-connection master;
-DROP TABLE test.t1, test.t2;
---sync_slave_with_master
-SHOW TABLES;
-
-# Run in some transactions using stored procedures
-# and ensure that the ndb_apply_status table is
-# updated to show the transactions
-
-
---echo
---echo *** Test 2 ***
---echo
-
-# Create database/tables and stored procdures
-connection master;
---source include/tpcb.inc
-
-# Switch tables on slave to use NDB
---sync_slave_with_master
-USE tpcb;
-ALTER TABLE account ENGINE NDB;
-ALTER TABLE branch ENGINE NDB;
-ALTER TABLE teller ENGINE NDB;
-ALTER TABLE history ENGINE NDB;
-
---echo
-
-# Load DB tpcb and run some transactions
-connection master;
---disable_query_log
-CALL tpcb.load();
-SET AUTOCOMMIT=0;
-let $run= 5;
-while ($run)
-{
- START TRANSACTION;
- --disable_warnings
- --eval CALL tpcb.trans($rpl_format);
- --enable_warnings
- eval SET @my_errno= $mysql_errno;
- let $run_good= `SELECT @my_errno = 0`;
- let $run_bad= `SELECT @my_errno <> 0`;
- if ($run_good)
- {
- COMMIT;
- }
- if ($run_bad)
- {
- ROLLBACK;
- }
- dec $run;
-}
-
-SET AUTOCOMMIT=1;
---enable_query_log
-
---sync_slave_with_master
---source include/select_ndb_apply_status.inc
-
---echo
-
-connection master;
---source include/show_binlog_using_logname.inc
-
-# Flush the logs on the master moving all
-# Transaction to a new binlog and ensure
-# that the ndb_apply_status table is updated
-# to show the use of the new binlog.
-
---echo
---echo ** Test 3 **
---echo
-
-# Flush logs on master which should force it
-# to switch to binlog #2
-
-FLUSH LOGS;
-
-# Run in some transaction to increase end pos in
-# binlog
-
---disable_query_log
-SET AUTOCOMMIT=0;
-let $run= 5;
-while ($run)
-{
- START TRANSACTION;
- --disable_warnings
- --eval CALL tpcb.trans($rpl_format);
- --enable_warnings
- eval SET @my_errno= $mysql_errno;
- let $run_good= `SELECT @my_errno = 0`;
- let $run_bad= `SELECT @my_errno <> 0`;
- if ($run_good)
- {
- COMMIT;
- }
- if ($run_bad)
- {
- ROLLBACK;
- }
- dec $run;
-}
-SET AUTOCOMMIT=1;
---enable_query_log
-
---echo
-
---sync_slave_with_master
---source include/select_ndb_apply_status.inc
-
---echo
-
-connection master;
---source include/show_binlog_using_logname.inc
-
-# Now we reset both the master and the slave
-# Run some more transaction and ensure
-# that the ndb_apply_status is updated
-# correctly
-
---echo
---echo ** Test 4 **
---echo
-
-# Reset both slave and master
-# This should reset binlog to #1
---source include/rpl_reset.inc
-
---echo
-
-# Run in some transactions and check
-connection master;
---disable_query_log
-SET AUTOCOMMIT=0;
-let $run= 5;
-while ($run)
-{
- START TRANSACTION;
- --disable_warnings
- --eval CALL tpcb.trans($rpl_format);
- --enable_warnings
- eval SET @my_errno= $mysql_errno;
- let $run_good= `SELECT @my_errno = 0`;
- let $run_bad= `SELECT @my_errno <> 0`;
- if ($run_good)
- {
- COMMIT;
- }
- if ($run_bad)
- {
- ROLLBACK;
- }
- dec $run;
-}
-SET AUTOCOMMIT=1;
---enable_query_log
-
---sync_slave_with_master
---source include/select_ndb_apply_status.inc
-
---echo
-
-connection master;
---source include/show_binlog_using_logname.inc
-
-# Since we are doing replication, it is a good
-# idea to check to make sure all data was
-# Replicated correctly
-
---echo
---echo *** DUMP MASTER & SLAVE FOR COMPARE ********
-
---exec $MYSQL_DUMP -n -t --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/master_apply_status.sql
-
---exec $MYSQL_DUMP_SLAVE -n -t --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/slave_apply_status.sql
-
-connection master;
-DROP DATABASE tpcb;
-
---sync_slave_with_master
-
-####### Commenting out until decision on Bug#27960 ###########
-
-#--source include/select_ndb_apply_status.inc
-
-#connection master;
-#--eval SHOW BINLOG EVENTS in '$log_name' from $start_pos
-#--source include/show_binlog_using_logname.inc
-
---echo ****** Do dumps compare ************
-
-
-diff_files $MYSQLTEST_VARDIR/tmp/master_apply_status.sql $MYSQLTEST_VARDIR/tmp/slave_apply_status.sql;
-
-## Note: Ths files should only get removed, if the above diff succeeds.
-
---exec rm $MYSQLTEST_VARDIR/tmp/master_apply_status.sql
---exec rm $MYSQLTEST_VARDIR/tmp/slave_apply_status.sql
-
-
-# End of 5.1 Test
diff --git a/mysql-test/extra/rpl_tests/rpl_partition.test b/mysql-test/extra/rpl_tests/rpl_partition.test
index 8f2956bf1ef..119e3bebc42 100644
--- a/mysql-test/extra/rpl_tests/rpl_partition.test
+++ b/mysql-test/extra/rpl_tests/rpl_partition.test
@@ -201,11 +201,11 @@ CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
PARTITION BY KEY()
PARTITIONS 4;
---echo --- Show that tables on master are ndbcluster tables ---
+--echo --- Show tables on master ---
SHOW CREATE TABLE t1;
---echo --- Show that tables on slave ---
+--echo --- Show tables on slave ---
sync_slave_with_master;
SHOW CREATE TABLE t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_blob.test b/mysql-test/extra/rpl_tests/rpl_row_blob.test
index 762daa816c0..5cd7b6b4b29 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_blob.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_blob.test
@@ -36,7 +36,6 @@ SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3;
save_master_pos;
connection slave;
sync_with_master;
---source include/wait_for_ndb_to_binlog.inc
--echo
--echo **** Data Insert Validation Slave Section test.t1 ****
--echo
@@ -59,7 +58,6 @@ SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
save_master_pos;
connection slave;
sync_with_master;
---source include/wait_for_ndb_to_binlog.inc
--echo
--echo **** Data Update Validation Slave Section test.t1 ****
--echo
@@ -130,7 +128,6 @@ FROM test.t2 WHERE c1=2;
save_master_pos;
connection slave;
sync_with_master;
---source include/wait_for_ndb_to_binlog.inc
--echo
--echo **** Data Insert Validation Slave Section test.t2 ****
--echo
@@ -156,7 +153,6 @@ FROM test.t2 WHERE c1=2;
save_master_pos;
connection slave;
sync_with_master;
---source include/wait_for_ndb_to_binlog.inc
--echo
--echo **** Data Update Validation Slave Section test.t2 ****
--echo
@@ -176,8 +172,4 @@ diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/r
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
# ensure cleanup on slave as well:
-# ndb blob tables consist of several tables
-# if cluster is shutdown while not all tables are
-# properly dropped, the table becomes inconsistent
-# and wrecks later test cases
--sync_slave_with_master
diff --git a/mysql-test/extra/rpl_tests/rpl_row_func003.test b/mysql-test/extra/rpl_tests/rpl_row_func003.test
index d12b5a3306a..f46f9eddc60 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_func003.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test
@@ -54,11 +54,8 @@ INSERT INTO test.t1 VALUES (null,test.f1());
ROLLBACK;
SET AUTOCOMMIT=1;
-# Sync master and slave for all engines except NDB
-if (`SELECT UPPER(LEFT('$engine_type', 3)) != 'NDB'`) {
sync_slave_with_master;
connection master;
-}
# Time to dump the databases and so we can see if they match
diff --git a/mysql-test/extra/rpl_tests/rpl_row_img.test b/mysql-test/extra/rpl_tests/rpl_row_img.test
new file mode 100644
index 00000000000..b905b81c4c6
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/rpl_row_img.test
@@ -0,0 +1,241 @@
+# WL#5096
+#
+# Description
+# ===========
+#
+# This test case checks replication between hosts with same index
+# structure but may differ on engines.
+#
+# Usage
+# =====
+#
+# Before including this file the following variables should be set:
+# * $server_1_engine
+# * $server_2_engine
+# * $server_3_engine
+#
+# Example:
+#
+# -- let $server_1_engine= Falcon
+# -- let $server_2_engine= MyISAM
+# -- let $server_3_engine= InnoDB
+#
+# -- source extra/rpl_tests/rpl_row_img.test
+#
+
+-- connection server_1
+
+-- let $diff_table=test.t
+
+let $i= 12;
+while($i)
+{
+ let $step= "";
+
+ -- connection server_1
+ SET SQL_LOG_BIN=0;
+
+ -- connection server_2
+ SET SQL_LOG_BIN=0;
+
+ -- connection server_3
+ SET SQL_LOG_BIN=0;
+
+ if ($i == 1) {
+ let $step= No keys;
+ --echo ******* TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1)) engine= $server_3_engine;
+
+ }
+ if ($i == 2)
+ {
+ let $step= One key;
+ --echo ******* TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1)) engine= $server_3_engine;
+
+ }
+ if ($i == 3)
+ {
+ let $step= One Composite key;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1,c2)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1,c2)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1,c2)) engine= $server_3_engine;
+ }
+ if ($i == 4)
+ {
+ let $step= One Unique key;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1)) engine= $server_3_engine;
+
+ }
+ if ($i == 5)
+ {
+ let $step= One Composite Unique key;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c2)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c2)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c2)) engine= $server_3_engine;
+
+ }
+ if ($i == 6)
+ {
+ let $step= One Primary key;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1)) engine= $server_3_engine;
+ }
+ if ($i == 7)
+ {
+ let $step= One Composite Primary Key;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1,c2)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1,c2)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1,c2)) engine= $server_3_engine;
+ }
+ if ($i == 8)
+ {
+ let $step= One Composite key with holes;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1,c3)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1,c3)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), key(c1,c3)) engine= $server_3_engine;
+ }
+ if ($i == 9)
+ {
+ let $step= One Composite Unique key with holes;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c3)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c3)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c3)) engine= $server_3_engine;
+ }
+ if ($i == 10)
+ {
+ let $step= One Composite Primary Key with holes;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1,c3)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1,c3)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), primary key(c1,c3)) engine= $server_3_engine;
+ }
+ if ($i == 11)
+ {
+ let $step= One Composite NOT NULL Unique key with holes;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 char(1), c3 char(1) NOT NULL, c4 char(1), unique key(c1,c3)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 char(1), c3 char(1) NOT NULL, c4 char(1), unique key(c1,c3)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 char(1), c3 char(1) NOT NULL, c4 char(1), unique key(c1,c3)) engine= $server_3_engine;
+ }
+ if ($i == 12)
+ {
+ let $step= One Composite NOT NULL Unique key with holes in master, but NULLABLE on first slave;
+ --echo ****** TEST: $step
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 char(1), c3 char(1) NOT NULL, c4 char(1), unique key(c1,c3)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 char(1), c3 char(1), c4 char(1), unique key(c1,c3)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 char(1), c3 char(1) NOT NULL, c4 char(1), unique key(c1,c3)) engine= $server_3_engine;
+ }
+
+ -- connection server_1
+ SET SQL_LOG_BIN=1;
+
+ -- connection server_2
+ SET SQL_LOG_BIN=1;
+
+ -- connection server_3
+ SET SQL_LOG_BIN=1;
+
+ -- connection server_1
+ INSERT INTO t VALUES (1, '1', '1', '1' );
+ INSERT INTO t VALUES (4, '4', '4', '4' );
+ INSERT INTO t VALUES (7, '7', '7', '7' );
+
+ INSERT INTO t VALUES (9, '9', '9', NULL );
+
+ INSERT INTO t VALUES (2, '1', '2', '2' );
+ INSERT INTO t VALUES (3, '1', '3', '2' );
+
+ -- source include/rpl_sync.inc
+
+ -- connection server_1
+ UPDATE t SET c4 = '7';
+
+ UPDATE t SET c4 = '5' WHERE c1 = 1;
+ UPDATE t SET c2 = '5' WHERE c1 = 1;
+ UPDATE t SET c1 = '5' WHERE c1 = 1;
+
+ UPDATE t SET c4 = '8' WHERE c2 = '4';
+ UPDATE t SET c1 = '8' WHERE c2 = '4';
+ UPDATE t SET c2 = '8' WHERE c2 = '4';
+
+ UPDATE t SET c3 = '0' WHERE c4 = NULL;
+ UPDATE t SET c2 = '0' WHERE c4 = '0';
+
+ UPDATE t SET c2 = '2' WHERE c4 = '2';
+
+ -- source include/rpl_sync.inc
+
+ -- let $diff_tables= server_1:$diff_table, server_2:$diff_table, server_3:$diff_table
+ -- source include/diff_tables.inc
+
+
+ -- connection server_1
+
+ DELETE FROM t WHERE c1 = 7;
+ DELETE FROM t WHERE c1 = 8;
+ DELETE FROM t;
+
+ -- source include/rpl_sync.inc
+
+ -- let $diff_tables= server_1:$diff_table, server_2:$diff_table, server_3:$diff_table
+ -- source include/diff_tables.inc
+
+ -- connection server_1
+
+ DROP TABLE t;
+
+ -- source include/rpl_sync.inc
+
+ dec $i;
+}
diff --git a/mysql-test/extra/rpl_tests/rpl_row_img_blobs.test b/mysql-test/extra/rpl_tests/rpl_row_img_blobs.test
new file mode 100644
index 00000000000..9d3a0a593e3
--- /dev/null
+++ b/mysql-test/extra/rpl_tests/rpl_row_img_blobs.test
@@ -0,0 +1,179 @@
+# WL#5096
+#
+# Description
+# ===========
+#
+# This test case covers Requirements for replication using different
+# combinations of indexes and blob fields.
+#
+# It acts as a complement for rpl_row_img_sanity tests as it checks
+# that in a chained replication scenario, replication does not break.
+#
+# Usage
+# =====
+#
+# Before including this file the following variables should be set:
+# * $server_1_engine
+# * $server_2_engine
+# * $server_3_engine
+#
+# Example:
+#
+# -- let $server_1_engine= Falcon
+# -- let $server_2_engine= MyISAM
+# -- let $server_3_engine= InnoDB
+#
+# -- source extra/rpl_tests/rpl_row_img_blobs.test
+#
+
+-- connection server_1
+
+-- let $diff_table=test.t
+let $i= 7;
+while($i)
+{
+ -- connection server_1
+ SET SQL_LOG_BIN=0;
+
+ -- connection server_2
+ SET SQL_LOG_BIN=0;
+
+ -- connection server_3
+ SET SQL_LOG_BIN=0;
+
+ #
+ # The comments below (on create table) must be read with the SQL
+ # instructions issued later in mind. Declaring a table obviously is
+ # not enough to assert anything.
+ #
+ # Also, the tests in this file make more sense when performed with
+ # binlog_row_image configured as NOBLOB.
+ #
+
+ if ($i == 1) {
+ -- echo ### Asserts that declaring a blob as part of a primary key does not break replication
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= $server_3_engine;
+ }
+ if ($i == 2)
+ {
+ -- echo ### Asserts that declaring a blob as part of a unique (not null) key does not break replication
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= $server_3_engine;
+ }
+ if ($i == 3)
+ {
+ -- echo ### Asserts that declaring a blob in a key does not break replication
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= $server_3_engine;
+
+ }
+ if ($i == 4) {
+ -- echo ### Asserts that updates without blobs in the BI (PK exists int the table)
+ -- echo ### will not break replication
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= $server_3_engine;
+
+ }
+ if ($i == 5)
+ {
+ -- echo ### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
+ -- echo ### will not break replication
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= $server_3_engine;
+
+ }
+ if ($i == 6)
+ {
+ -- echo ### Asserts that updates without blobs in the AI (they are not updated)
+ -- echo ### will not break replication (check even if there is a key in the table)
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= $server_3_engine;
+
+ }
+ if ($i == 7)
+ {
+ -- echo ### Asserts that updates without blobs in the AI (they are not updated)
+ -- echo ### will not break replication (check when there is no key in the table)
+ -- connection server_1
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int) engine= $server_1_engine;
+ -- connection server_2
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int) engine= $server_2_engine;
+ -- connection server_3
+ --eval CREATE TABLE t (c1 int, c2 blob, c3 int) engine= $server_3_engine;
+ }
+
+ -- connection server_1
+ SET SQL_LOG_BIN=1;
+
+ -- connection server_2
+ SET SQL_LOG_BIN=1;
+
+ -- connection server_3
+ SET SQL_LOG_BIN=1;
+
+ -- connection server_1
+
+ -- let $blob1= "a"
+ -- let $blob2= "b"
+ -- let $blob3= "c"
+
+ -- eval INSERT INTO t VALUES (1, $blob1, 10)
+ -- eval INSERT INTO t VALUES (2, $blob2, 20)
+ -- eval INSERT INTO t VALUES (3, $blob3, 30)
+
+ -- source include/rpl_sync.inc
+
+ -- connection server_1
+ -- eval UPDATE t SET c1=10 WHERE c2=$blob1
+ -- eval UPDATE t SET c1=20 WHERE c1=2
+ -- eval UPDATE t SET c1=30 WHERE c3=30
+ -- eval UPDATE t SET c3=40 WHERE c1=30
+
+ -- source include/rpl_sync.inc
+
+ -- let $diff_tables= server_1:$diff_table, server_2:$diff_table, server_3:$diff_table
+ -- source include/diff_tables.inc
+
+ -- connection server_1
+ -- eval DELETE FROM t WHERE c2=$blob1
+ -- eval DELETE FROM t WHERE c1=20
+ -- eval DELETE FROM t
+
+ -- source include/rpl_sync.inc
+
+ -- let $diff_tables= server_1:$diff_table, server_2:$diff_table, server_3:$diff_table
+ -- source include/diff_tables.inc
+
+ -- connection server_1
+
+ DROP TABLE t;
+
+ -- source include/rpl_sync.inc
+
+ dec $i;
+}
diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp003.test b/mysql-test/extra/rpl_tests/rpl_row_sp003.test
index d2c2ea0caf3..a8f25485f26 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_sp003.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_sp003.test
@@ -53,8 +53,6 @@ SELECT release_lock("test");
connection master;
SELECT * FROM test.t1;
-#show binlog events;
---source include/wait_for_ndb_to_binlog.inc
sync_slave_with_master;
connection slave;
SELECT * FROM test.t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test
index 868b8e73d0a..6edbbf68266 100644
--- a/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test
+++ b/mysql-test/extra/rpl_tests/rpl_sv_relay_space.test
@@ -8,8 +8,6 @@ SHOW VARIABLES LIKE 'relay_log_space_limit';
# Matz says: I have no idea what this is supposed to test, but it has
# potential for generating different results with some storage engines
# that process rows in an order not dependent on the insertion order.
-# For instance, I would assume that distributed storage engines (like
-# NDB) could process rows based on locality.
eval CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=$engine_type;
INSERT INTO t1 SET name='Andy', age=31;
diff --git a/mysql-test/extra/rpl_tests/rpl_trig004.test b/mysql-test/extra/rpl_tests/rpl_trig004.test
index 1a738db27fc..4988fe87f8f 100644
--- a/mysql-test/extra/rpl_tests/rpl_trig004.test
+++ b/mysql-test/extra/rpl_tests/rpl_trig004.test
@@ -7,7 +7,6 @@
#############################################################################
# Change Auth: JBM #
# Date: 2006-02-14 #
-# Change: Added error, sleep and comments (ndb) #
####################################################
# Begin clean up test section
@@ -28,15 +27,12 @@ CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO t
delimiter ;//
INSERT INTO test.t2 VALUES (1, 0.0);
-# Expect duplicate error 1022 == ndb
---error 1022, ER_DUP_ENTRY
+--error ER_DUP_ENTRY
INSERT INTO test.t2 VALUES (1, 0.0);
#show binlog events;
select * from test.t1;
select * from test.t2;
-let $wait_time= 10;
---source include/wait_for_ndb_to_binlog.inc
sync_slave_with_master;
connection slave;
select * from test.t1;