mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +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.
98 lines
3.1 KiB
Text
98 lines
3.1 KiB
Text
--source include/have_ndb.inc
|
|
-- source include/have_binlog_format_row.inc
|
|
-- source include/not_embedded.inc
|
|
|
|
--disable_query_log
|
|
set new=on;
|
|
--enable_query_log
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
#
|
|
# Minimal NDB blobs test with range partitions.
|
|
#
|
|
|
|
create table t1 (
|
|
a mediumint not null,
|
|
b text not null,
|
|
c int not null,
|
|
d longblob,
|
|
primary key using hash (a,c),
|
|
unique key (c)
|
|
)
|
|
engine=ndb
|
|
partition by range (c)
|
|
partitions 3
|
|
( partition p1 values less than (200),
|
|
partition p2 values less than (300),
|
|
partition p3 values less than (400));
|
|
|
|
--disable_query_log
|
|
sleep 1;
|
|
|
|
# length 61
|
|
set @s0 = 'rggurloniukyehuxdbfkkyzlceixzrehqhvxvxbpwizzvjzpucqmzrhzxzfau';
|
|
set @s1 = 'ykyymbzqgqlcjhlhmyqelfoaaohvtbekvifukdtnvcrrjveevfakxarxexomz';
|
|
set @s2 = 'dbnfqyzgtqxalcrwtfsqabknvtfcbpoonxsjiqvmhnfikxxhcgoexlkoezvah';
|
|
|
|
set @v1 = repeat(@s0, 100); # 1d42dd9090cf78314a06665d4ea938c35cc760f4
|
|
set @v2 = repeat(@s1, 200); # 10d3c783026b310218d10b7188da96a2401648c6
|
|
set @v3 = repeat(@s2, 300); # a33549d9844092289a58ac348dd59f09fc28406a
|
|
set @v4 = repeat(@s0, 400); # daa61c6de36a0526f0d47dc29d6b9de7e6d2630c
|
|
set @v5 = repeat(@s1, 500); # 70fc9a7d08beebc522258bfb02000a30c77a8f1d
|
|
set @v6 = repeat(@s2, 600); # 090565c580809efed3d369481a4bbb168b20713e
|
|
set @v7 = repeat(@s0, 700); # 1e0070bec426871a46291de27b9bd6e4255ab4e5
|
|
set @v8 = repeat(@s1, 800); # acbaba01bc2e682f015f40e79d9cbe475db3002e
|
|
set @v9 = repeat(@s2, 900); # 9ee30d99162574f79c66ae95cdf132dcf9cbc259
|
|
--enable_query_log
|
|
|
|
# -- insert --
|
|
insert into t1 values (1, @v1, 101, @v2);
|
|
insert into t1 values (1, @v2, 102, @v3);
|
|
insert into t1 values (1, @v3, 103, @v4);
|
|
insert into t1 values (2, @v4, 201, @v5);
|
|
insert into t1 values (2, @v5, 202, @v6);
|
|
insert into t1 values (2, @v6, 203, @v7);
|
|
insert into t1 values (3, @v7, 301, @v8);
|
|
insert into t1 values (3, @v8, 302, @v9);
|
|
insert into t1 values (3, @v9, 303, @v1);
|
|
select a, sha1(b), c, sha1(d) from t1 order by a;
|
|
|
|
# -- pk read --
|
|
select a, sha1(b), c, sha1(d) from t1 where a = 1 and c = 101;
|
|
select a, sha1(b), c, sha1(d) from t1 where a = 2 and c = 201;
|
|
select a, sha1(b), c, sha1(d) from t1 where a = 3 and c = 301;
|
|
|
|
# -- pk update --
|
|
update t1 set b = @v3, d = @v4 where a = 1 and c = 102;
|
|
update t1 set b = @v6, d = @v7 where a = 2 and c = 202;
|
|
update t1 set b = @v9, d = @v1 where a = 3 and c = 302;
|
|
select a, sha1(b), c, sha1(d) from t1 order by a;
|
|
|
|
# -- hash index update --
|
|
update t1 set b = @v4, d = @v5 where c = 103;
|
|
update t1 set b = @v7, d = @v8 where c = 203;
|
|
update t1 set b = @v1, d = @v2 where c = 303;
|
|
select a, sha1(b), c, sha1(d) from t1 order by a;
|
|
|
|
# -- full scan update --
|
|
update t1 set b = @v5, d = @v6;
|
|
select a, sha1(b), c, sha1(d) from t1 order by a;
|
|
|
|
# -- range scan update
|
|
update t1 set b = @v1, d = @v2 where 100 < c and c < 200;
|
|
update t1 set b = @v4, d = @v5 where 200 < c and c < 300;
|
|
update t1 set b = @v7, d = @v8 where 300 < c and c < 400;
|
|
select a, sha1(b), c, sha1(d) from t1 order by a;
|
|
|
|
# -- delete --
|
|
delete from t1 where a = 1 and c = 101;
|
|
delete from t1 where c = 102;
|
|
# delete from t1 where c < 300; # XXX coredump
|
|
delete from t1;
|
|
select a, sha1(b), c, sha1(d) from t1 order by a;
|
|
|
|
# -- clean up --
|
|
drop table t1;
|