From 87a51facbc8a14e15e25cb3fc7100c94559214b1 Mon Sep 17 00:00:00 2001 From: unknown <mats@kindahl-laptop.dnsalias.net> Date: Fri, 22 Jun 2007 01:39:23 +0200 Subject: [PATCH] BUG#28722 (Multi-engine statements on has_own_binlogging engine): Test fixes resulting from changed semantics. mysql-test/extra/rpl_tests/rpl_row_UUID.test: Using same engine throughout to prevent NDB tests from failing. mysql-test/r/binlog_multi_engine.result: Result change. mysql-test/r/ndb_read_multi_range.result: Result change. mysql-test/r/ndb_trigger.result: Result change. mysql-test/r/rpl_ndb_UUID.result: Result change. mysql-test/r/rpl_row_UUID.result: Result change. mysql-test/t/binlog_multi_engine.test: Removing garbage. mysql-test/t/ndb_read_multi_range.test: Using ndbcluster for table used inside trigger. mysql-test/t/ndb_trigger.test: Using ndbcluster for table used inside trigger. --- mysql-test/extra/rpl_tests/rpl_row_UUID.test | 2 +- mysql-test/r/binlog_multi_engine.result | 17 +++-------------- mysql-test/r/ndb_read_multi_range.result | 2 +- mysql-test/r/ndb_trigger.result | 4 ++-- mysql-test/r/rpl_ndb_UUID.result | 2 +- mysql-test/r/rpl_row_UUID.result | 2 +- mysql-test/t/binlog_multi_engine.test | 1 - mysql-test/t/ndb_read_multi_range.test | 2 +- mysql-test/t/ndb_trigger.test | 4 ++-- 9 files changed, 12 insertions(+), 24 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_row_UUID.test b/mysql-test/extra/rpl_tests/rpl_row_UUID.test index ee2a29ac938..9f2dbb4ce4b 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_UUID.test +++ b/mysql-test/extra/rpl_tests/rpl_row_UUID.test @@ -41,7 +41,7 @@ end| delimiter ;| # test both in SELECT and in INSERT select fn1(0); -create table t2 (a int); +eval create table t2 (a int) engine=$engine_type; insert into t2 values(fn1(2)); sync_slave_with_master; diff --git a/mysql-test/r/binlog_multi_engine.result b/mysql-test/r/binlog_multi_engine.result index 98244edca3d..30665523a99 100644 --- a/mysql-test/r/binlog_multi_engine.result +++ b/mysql-test/r/binlog_multi_engine.result @@ -11,7 +11,6 @@ START TRANSACTION; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -ERROR HY000: Binary logging not possible. Message: Statement-based format required for this statement, but not allowed by this combination of engines COMMIT; TRUNCATE t1m; TRUNCATE t1b; @@ -49,18 +48,6 @@ ERROR HY000: Binary logging not possible. Message: Statement cannot be written a TRUNCATE t1m; TRUNCATE t1b; TRUNCATE t1n; -SET SESSION BINLOG_FORMAT=ROW; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); -INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); -ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines -INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); -UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; -ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines -UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; -ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging -UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines -DROP TABLE t1m, t1b, t1n; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) @@ -84,8 +71,10 @@ ERROR HY000: Binary logging not possible. Message: Row-based format required for INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines +UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; +ERROR HY000: Binary logging not possible. Message: Statement cannot be written atomically since more than one engine involved and at least one engine is self-logging UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; -ERROR HY000: Binary logging not possible. Message: Statement cannot be logged to the binary log in row-based nor statement-based format +ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Table_map # # table_id: # (test.t1m) diff --git a/mysql-test/r/ndb_read_multi_range.result b/mysql-test/r/ndb_read_multi_range.result index aef009212a4..8443d0473a8 100644 --- a/mysql-test/r/ndb_read_multi_range.result +++ b/mysql-test/r/ndb_read_multi_range.result @@ -451,7 +451,7 @@ CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) -) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; +) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| diff --git a/mysql-test/r/ndb_trigger.result b/mysql-test/r/ndb_trigger.result index 28f9f9bdc37..d074ad01c22 100644 --- a/mysql-test/r/ndb_trigger.result +++ b/mysql-test/r/ndb_trigger.result @@ -1,7 +1,7 @@ drop table if exists t1, t2, t3, t4, t5; create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)); -create table t3 select 1 as i; +create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb; +create table t3 engine=ndb select 1 as i; create table t4 (a int not null primary key, b int) engine=ndb; create table t5 (a int not null primary key, b int) engine=ndb; create trigger t1_bu before update on t1 for each row diff --git a/mysql-test/r/rpl_ndb_UUID.result b/mysql-test/r/rpl_ndb_UUID.result index 422379d4f55..6babf49dcaa 100644 --- a/mysql-test/r/rpl_ndb_UUID.result +++ b/mysql-test/r/rpl_ndb_UUID.result @@ -24,7 +24,7 @@ end| select fn1(0); fn1(0) 0 -create table t2 (a int); +create table t2 (a int) engine=NDB; insert into t2 values(fn1(2)); SHOW CREATE TABLE test.t1; Table Create Table diff --git a/mysql-test/r/rpl_row_UUID.result b/mysql-test/r/rpl_row_UUID.result index f56dc145901..02174a7ecae 100644 --- a/mysql-test/r/rpl_row_UUID.result +++ b/mysql-test/r/rpl_row_UUID.result @@ -24,7 +24,7 @@ end| select fn1(0); fn1(0) 0 -create table t2 (a int); +create table t2 (a int) engine=myisam; insert into t2 values(fn1(2)); SHOW CREATE TABLE test.t1; Table Create Table diff --git a/mysql-test/t/binlog_multi_engine.test b/mysql-test/t/binlog_multi_engine.test index b8d336fa7ed..fa303281cc2 100644 --- a/mysql-test/t/binlog_multi_engine.test +++ b/mysql-test/t/binlog_multi_engine.test @@ -54,7 +54,6 @@ UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; #UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; ->>>>>>> error ER_BINLOG_LOGGING_IMPOSSIBLE; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; diff --git a/mysql-test/t/ndb_read_multi_range.test b/mysql-test/t/ndb_read_multi_range.test index b4e5943269c..b5b46958065 100644 --- a/mysql-test/t/ndb_read_multi_range.test +++ b/mysql-test/t/ndb_read_multi_range.test @@ -286,7 +286,7 @@ CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) - ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; + ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; DELIMITER |; diff --git a/mysql-test/t/ndb_trigger.test b/mysql-test/t/ndb_trigger.test index 00927f93d10..e6d91c05313 100644 --- a/mysql-test/t/ndb_trigger.test +++ b/mysql-test/t/ndb_trigger.test @@ -19,8 +19,8 @@ drop table if exists t1, t2, t3, t4, t5; --enable_warnings create table t1 (id int primary key, a int not null, b decimal (63,30) default 0) engine=ndb; -create table t2 (op char(1), a int not null, b decimal (63,30)); -create table t3 select 1 as i; +create table t2 (op char(1), a int not null, b decimal (63,30)) engine=ndb; +create table t3 engine=ndb select 1 as i; create table t4 (a int not null primary key, b int) engine=ndb; create table t5 (a int not null primary key, b int) engine=ndb; -- 2.30.9