mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
f3dc047890
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.
87 lines
2.8 KiB
Text
87 lines
2.8 KiB
Text
-- source include/have_ndb.inc
|
|
-- source include/have_binlog_format_row.inc
|
|
-- source include/have_multi_ndb.inc
|
|
-- source include/ndb_default_cluster.inc
|
|
-- source include/not_embedded.inc
|
|
|
|
# see bug#21563
|
|
-- source include/have_binlog_format_row.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1, t2;
|
|
--enable_warnings
|
|
|
|
# Workaround for Bug#27644
|
|
# ndb: connecting api node/mysqld may "steal" node_id from running mysqld
|
|
# - let ndb_waiter use a fixed node id so "steal" cannot happen
|
|
--let connect_str = "nodeid=6;$NDB_CONNECTSTRING"
|
|
|
|
#
|
|
# Transaction ongoing while cluster is restarted
|
|
#
|
|
--connection server1
|
|
create table t1 (a int key) engine=ndbcluster;
|
|
|
|
begin;
|
|
insert into t1 values (1);
|
|
|
|
--exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT
|
|
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT
|
|
# Wait for mysqld to reconnect and exit from readonly mode
|
|
# Should preferrably be a "while (!"select ndb_readonly")" loop
|
|
sleep 2;
|
|
--error 1297
|
|
insert into t1 values (2);
|
|
--error 1296
|
|
commit;
|
|
|
|
drop table t1;
|
|
|
|
#
|
|
# Stale cache after restart -i
|
|
#
|
|
--connection server1
|
|
create table t2 (a int, b int, primary key(a,b)) engine=ndbcluster;
|
|
insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1);
|
|
select * from t2 order by a limit 3;
|
|
|
|
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
|
|
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT
|
|
# to ensure mysqld has connected again, and recreated system tables
|
|
--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT
|
|
sleep 2;
|
|
--connection server2
|
|
--error ER_NO_SUCH_TABLE
|
|
select * from t2;
|
|
show tables like 't2';
|
|
reset master;
|
|
create table t2 (a int key) engine=ndbcluster;
|
|
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
select * from t2 order by a limit 3;
|
|
|
|
# server 1 should have a stale cache, and in this case wrong frm, transaction must be retried
|
|
--connection server1
|
|
select * from t2 order by a limit 3;
|
|
reset master;
|
|
|
|
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
|
|
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT
|
|
# to ensure mysqld has connected again, and recreated system tables
|
|
--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT
|
|
sleep 2;
|
|
--connection server1
|
|
--error ER_NO_SUCH_TABLE
|
|
select * from t2;
|
|
show tables like 't2';
|
|
reset master;
|
|
create table t2 (a int key) engine=ndbcluster;
|
|
insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
|
|
select * from t2 order by a limit 3;
|
|
|
|
# server 2 should have a stale cache, but with right frm, transaction need not be retried
|
|
--connection server2
|
|
select * from t2 order by a limit 3;
|
|
reset master;
|
|
|
|
drop table t2;
|
|
# End of 4.1 tests
|