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.
190 lines
4.8 KiB
Text
190 lines
4.8 KiB
Text
-- source include/have_ndb.inc
|
|
-- source include/have_binlog_format_row.inc
|
|
-- source include/ndb_default_cluster.inc
|
|
-- source include/not_embedded.inc
|
|
|
|
--disable_warnings
|
|
use test;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
|
|
--enable_warnings
|
|
|
|
# basic datatypes
|
|
create table t1
|
|
(pk int key
|
|
,a1 BIT(1), a2 BIT(5), a3 BIT(33), a4 BIT(63), a5 BIT(64)
|
|
,b1 TINYINT, b2 TINYINT UNSIGNED
|
|
,c1 SMALLINT, c2 SMALLINT UNSIGNED
|
|
,d1 INT, d2 INT UNSIGNED
|
|
,e1 BIGINT, e2 BIGINT UNSIGNED
|
|
,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY
|
|
,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY
|
|
,h1 BINARY(1), h2 BINARY(8), h3 BINARY(255)
|
|
,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000)
|
|
) engine myisam;
|
|
|
|
# max values
|
|
insert into t1 values
|
|
(1
|
|
,0x1, 0x17, 0x789a, 0x789abcde, 0xfedc0001
|
|
,127, 255
|
|
,32767, 65535
|
|
,2147483647, 4294967295
|
|
,9223372036854775807, 18446744073709551615
|
|
,'1','12345678901234567890123456789012','123456789'
|
|
,'1','12345678901234567890123456789012','123456789'
|
|
,0x12,0x123456789abcdef0, 0x012345
|
|
,0x12,0x123456789abcdef0, 0x00123450
|
|
);
|
|
|
|
# min values
|
|
insert into t1 values
|
|
(2
|
|
,0, 0, 0, 0, 0
|
|
,-128, 0
|
|
,-32768, 0
|
|
,-2147483648, 0
|
|
,-9223372036854775808, 0
|
|
,'','',''
|
|
,'','',''
|
|
,0x0,0x0,0x0
|
|
,0x0,0x0,0x0
|
|
);
|
|
|
|
# null values
|
|
insert into t1 values
|
|
(3
|
|
,NULL,NULL,NULL,NULL,NULL
|
|
,NULL,NULL
|
|
,NULL,NULL
|
|
,NULL,NULL
|
|
,NULL,NULL
|
|
,NULL,NULL,NULL
|
|
,NULL,NULL,NULL
|
|
,NULL,NULL,NULL
|
|
,NULL,NULL,NULL
|
|
);
|
|
|
|
--vertical_results
|
|
select pk
|
|
,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5)
|
|
,b1, b2
|
|
,c1 , c2
|
|
,d1 , d2
|
|
,e1 , e2
|
|
,f1 , f2, f3
|
|
,g1 , g2, g3
|
|
,hex(h1), hex(h2), hex(h3)
|
|
,hex(i1), hex(i2), hex(i3)
|
|
from t1 order by pk;
|
|
|
|
alter table t1 engine ndb;
|
|
|
|
select pk
|
|
,hex(a1), hex(a2), hex(a3), hex(a4), hex(a5)
|
|
,b1, b2
|
|
,c1 , c2
|
|
,d1 , d2
|
|
,e1 , e2
|
|
,f1 , f2, f3
|
|
,g1 , g2, g3
|
|
,hex(h1), hex(h2), hex(h3)
|
|
,hex(i1), hex(i2), hex(i3)
|
|
from t1 order by pk;
|
|
--horizontal_results
|
|
|
|
--source include/ndb_backup.inc
|
|
|
|
--let ndb_restore_filter=test t1
|
|
--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";"
|
|
--source include/ndb_backup_print.inc
|
|
|
|
--let ndb_restore_filter=test t1
|
|
--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by="," --fields-optionally-enclosed-by="'"
|
|
--source include/ndb_backup_print.inc
|
|
|
|
|
|
drop table t1;
|
|
|
|
# some binary char tests with trailing spaces
|
|
create table t1
|
|
(pk int key
|
|
,f1 CHAR(1) BINARY, f2 CHAR(32) BINARY, f3 CHAR(255) BINARY
|
|
,g1 VARCHAR(32) BINARY, g2 VARCHAR(255) BINARY, g3 VARCHAR(1000) BINARY
|
|
,h1 BINARY(1), h2 BINARY(9), h3 BINARY(255)
|
|
,i1 VARBINARY(32), i2 VARBINARY(255), i3 VARBINARY(1000)
|
|
) engine ndb;
|
|
|
|
insert into t1 values
|
|
(1
|
|
,'1','12345678901234567890123456789012','123456789 '
|
|
,'1 ','12345678901234567890123456789012 ','123456789 '
|
|
,0x20,0x123456789abcdef020, 0x012345000020
|
|
,0x1200000020,0x123456789abcdef000000020, 0x00123450000020
|
|
);
|
|
|
|
create table t2 (pk int key, a int) engine ndb;
|
|
create table t3 (pk int key, a int) engine ndb;
|
|
create table t4 (pk int key, a int) engine ndb;
|
|
|
|
insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15);
|
|
insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25);
|
|
insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35);
|
|
|
|
--source include/ndb_backup.inc
|
|
--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-enclosed-by="'" --fields-optionally-enclosed-by="X"
|
|
--let ndb_restore_filter=test t1
|
|
--source include/ndb_backup_print.inc
|
|
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt
|
|
|
|
--let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append
|
|
--let ndb_restore_filter=test
|
|
--source include/ndb_backup_print.inc
|
|
|
|
--let $message= t1
|
|
--source include/show_msg.inc
|
|
--exec sort $MYSQLTEST_VARDIR/tmp/t1.txt
|
|
--let $message= t2
|
|
--source include/show_msg.inc
|
|
--exec sort $MYSQLTEST_VARDIR/tmp/t2.txt
|
|
--let $message= t3
|
|
--source include/show_msg.inc
|
|
--exec sort $MYSQLTEST_VARDIR/tmp/t3.txt
|
|
--let $message= t4
|
|
--source include/show_msg.inc
|
|
--exec sort $MYSQLTEST_VARDIR/tmp/t4.txt
|
|
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t1.txt
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t2.txt
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t3.txt
|
|
--exec rm -f $MYSQLTEST_VARDIR/tmp/t4.txt
|
|
|
|
# now test some other datatypes
|
|
drop table t1;
|
|
create table t1
|
|
(pk int key
|
|
,a1 MEDIUMINT, a2 MEDIUMINT UNSIGNED
|
|
) engine ndb;
|
|
|
|
# max values
|
|
insert into t1 values(1, 8388607, 16777215);
|
|
# min values
|
|
insert into t1 values(2, -8388608, 0);
|
|
# small values
|
|
insert into t1 values(3, -1, 1);
|
|
|
|
# backup and print
|
|
--source include/ndb_backup.inc
|
|
|
|
--let ndb_restore_filter=test t1
|
|
--let ndb_restore_opts=--verbose=0 --print_data --hex --fields-terminated-by=";"
|
|
--source include/ndb_backup_print.inc
|
|
|
|
# clean up
|
|
drop table t1;
|
|
drop table t2;
|
|
drop table t3;
|
|
drop table t4;
|