2007-06-21 13:34:06 +02:00
|
|
|
# Test to test how logging is done depending on the capabilities of
|
|
|
|
# the engines. Unfortunately, we don't have a good row-only logging
|
|
|
|
# engine, and NDB does not really cut is since it is also
|
|
|
|
# self-logging. I'm using it nevertheless.
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
source include/have_blackhole.inc;
|
|
|
|
source include/have_ndb.inc;
|
2007-06-27 22:23:44 +02:00
|
|
|
source include/have_log_bin.inc;
|
2007-05-28 12:50:29 +02:00
|
|
|
|
|
|
|
CREATE TABLE t1m (m INT, n INT) ENGINE=MYISAM;
|
|
|
|
CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE;
|
|
|
|
CREATE TABLE t1n (e INT, f INT) ENGINE=NDB;
|
|
|
|
|
2007-06-19 22:18:16 +02:00
|
|
|
RESET MASTER;
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
SET SESSION BINLOG_FORMAT=STATEMENT;
|
|
|
|
|
|
|
|
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
2008-02-29 00:50:15 +03:00
|
|
|
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
2007-05-28 12:50:29 +02:00
|
|
|
|
|
|
|
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
2007-06-19 22:18:16 +02:00
|
|
|
|
2008-02-29 00:50:15 +03:00
|
|
|
# Here and below we need to wait when some event appears in binlog
|
|
|
|
# to avoid unsrted mixing local events and from NDB
|
|
|
|
let $wait_binlog_event= t1m, t1b;
|
|
|
|
source include/wait_for_binlog_event.inc;
|
|
|
|
|
2007-06-19 22:18:16 +02:00
|
|
|
echo *** Please look in binlog_multi_engine.test if you have a diff here ****;
|
|
|
|
START TRANSACTION;
|
|
|
|
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
|
|
|
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
|
2007-06-19 22:18:16 +02:00
|
|
|
COMMIT;
|
2007-05-28 12:50:29 +02:00
|
|
|
|
2008-02-29 00:50:15 +03:00
|
|
|
let $wait_binlog_event= COMMIT;
|
|
|
|
source include/wait_for_binlog_event.inc;
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
TRUNCATE t1m;
|
|
|
|
TRUNCATE t1b;
|
|
|
|
TRUNCATE t1n;
|
|
|
|
|
2008-02-29 00:50:15 +03:00
|
|
|
let $wait_binlog_event= t1n;
|
|
|
|
source include/wait_for_binlog_event.inc;
|
|
|
|
|
2007-06-19 22:18:16 +02:00
|
|
|
source include/show_binlog_events.inc;
|
|
|
|
|
|
|
|
RESET MASTER;
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
SET SESSION BINLOG_FORMAT=MIXED;
|
|
|
|
|
|
|
|
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
2008-02-29 00:50:15 +03:00
|
|
|
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
|
|
|
|
|
|
|
let $wait_binlog_event= t1m;
|
|
|
|
source include/wait_for_binlog_event.inc;
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
|
|
|
|
|
2008-02-29 00:50:15 +03:00
|
|
|
let $wait_binlog_event= COMMIT;
|
|
|
|
source include/wait_for_binlog_event.inc;
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
2007-06-21 13:34:06 +02:00
|
|
|
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
2007-06-18 11:29:32 +02:00
|
|
|
|
|
|
|
# Not possible to test this since NDB writes its own binlog, which
|
|
|
|
# might cause it to be out of sync with the results from MyISAM.
|
|
|
|
# This will generate an error once BUG#28722 is fixed.
|
|
|
|
|
|
|
|
#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
|
|
|
|
2007-06-13 12:28:35 +02:00
|
|
|
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
|
|
|
|
|
|
|
|
TRUNCATE t1m;
|
|
|
|
TRUNCATE t1b;
|
|
|
|
TRUNCATE t1n;
|
|
|
|
|
2007-06-19 22:18:16 +02:00
|
|
|
source include/show_binlog_events.inc;
|
|
|
|
|
|
|
|
RESET MASTER;
|
|
|
|
|
2007-05-28 12:50:29 +02:00
|
|
|
SET SESSION BINLOG_FORMAT=ROW;
|
|
|
|
|
|
|
|
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
2007-06-13 12:28:35 +02:00
|
|
|
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
2007-05-28 12:50:29 +02:00
|
|
|
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
|
|
|
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
|
|
|
|
|
2007-06-13 12:28:35 +02:00
|
|
|
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
2007-06-21 13:34:06 +02:00
|
|
|
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
2007-06-18 11:29:32 +02:00
|
|
|
|
|
|
|
# Not possible to test this since NDB writes its own binlog, which
|
|
|
|
# might cause it to be out of sync with the results from MyISAM.
|
|
|
|
# This will generate an error once BUG#28722 is fixed.
|
|
|
|
|
|
|
|
#UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
|
|
|
|
2007-06-13 12:28:35 +02:00
|
|
|
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
2007-05-28 12:50:29 +02:00
|
|
|
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
|
|
|
|
|
2007-06-19 22:18:16 +02:00
|
|
|
source include/show_binlog_events.inc;
|
|
|
|
|
|
|
|
RESET MASTER;
|
|
|
|
|
WL#3303 (RBR: Engine-controlled logging format):
Test case fixes.
mysql-test/r/binlog_multi_engine.result:
Result change.
mysql-test/r/rpl_ndb_stm_innodb.result:
Result change.
mysql-test/t/binlog_multi_engine.test:
NDB tests only work in MIXED or ROW mode. Adding some cleanup actions.
mysql-test/t/loaddata_autocom_ndb.test:
NDB requires MIXED or ROW mode.
mysql-test/t/ndb_alter_table.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_alter_table2.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_alter_table3.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_autodiscover.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_autodiscover2.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_autodiscover3.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_basic.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_binlog_log_bin.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_binlog_multi.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_bitfield.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_blob.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_blob_partition.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_cache.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_cache2.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_cache_multi.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_cache_multi2.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_charset.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_condition_pushdown.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_config.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_config2.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_cursor.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_database.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_alter.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_backuprestore.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_basic.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_ddl.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_disk2memory.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_dump.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_dd_sql_features.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_gis.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_index.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_index_ordered.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_index_unique.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_insert.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_limit.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_loaddatalocal.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_lock.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_minmax.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_multi.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_partition_error.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_partition_key.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_partition_list.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_partition_range.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_read_multi_range.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_rename.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_replace.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_restore.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_restore_partition.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_restore_print.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_row_format.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_single_user.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_sp.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_subquery.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_temporary.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_transaction.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_trigger.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_truncate.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_types.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_update.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndb_view.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ndbapi.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/ps_7ndb.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/rpl_ndb_commit_afterflush.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/rpl_ndb_innodb_trans.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
mysql-test/t/rpl_ndb_stm_innodb.test:
We need MIXED mode on slave since it is necessary to let the slave
switch to row format when executing replicated statements.
mysql-test/t/strict_autoinc_5ndb.test:
NDB requires MIXED or ROW mode, but will switch to row format
automatically, so we only run these tests under ROW mode.
2007-06-14 11:05:48 +02:00
|
|
|
DROP TABLE t1m, t1b, t1n;
|
2007-05-28 12:50:29 +02:00
|
|
|
|