diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2008-11-21 15:21:50 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2008-11-21 15:21:50 +0100 |
commit | 33b194c36ec28528fd349dd17412848de2f1171c (patch) | |
tree | 68cba4897925b9395dd0bfe53b5b95a777d78637 /mysql-test/suite/ndb/t | |
parent | 8d96bcda72df224f7a656cbcc1535a027bada75f (diff) | |
parent | 1d521f6c20881997c9162bd11cadcbc77d20520b (diff) | |
download | mariadb-git-33b194c36ec28528fd349dd17412848de2f1171c.tar.gz |
Merge of 5.1-main into 5.1-maria. There were no changes to storage/myisam, or mysql-test/t/*myisam*.
However there were three new tests mysql-test/suite/parts/t/partition*myisam.test, of which I make here
copies for Maria.
Diffstat (limited to 'mysql-test/suite/ndb/t')
-rw-r--r-- | mysql-test/suite/ndb/t/disabled.def | 1 | ||||
-rw-r--r-- | mysql-test/suite/ndb/t/ndb_alter_table.test | 29 | ||||
-rw-r--r-- | mysql-test/suite/ndb/t/ndb_restore_print.test | 20 |
3 files changed, 36 insertions, 14 deletions
diff --git a/mysql-test/suite/ndb/t/disabled.def b/mysql-test/suite/ndb/t/disabled.def index 6102d182684..c638c7b4774 100644 --- a/mysql-test/suite/ndb/t/disabled.def +++ b/mysql-test/suite/ndb/t/disabled.def @@ -12,6 +12,5 @@ partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table ndb_partition_error2 : HF is not sure if the test can work as internded on all the platforms -ndb_index_ordered : Bug#38370 The test ndb.ndb_index_ordered fails with the community features on # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open diff --git a/mysql-test/suite/ndb/t/ndb_alter_table.test b/mysql-test/suite/ndb/t/ndb_alter_table.test index 082fe726927..cbd941b8a9c 100644 --- a/mysql-test/suite/ndb/t/ndb_alter_table.test +++ b/mysql-test/suite/ndb/t/ndb_alter_table.test @@ -411,13 +411,32 @@ select * from t1 where a = 12; drop table t1; # some other ALTER combinations -# add/drop pk -create table t1 (a int not null, b varchar(10)) engine=ndb; -show index from t1; +# Check add/drop primary key (not supported on-line) +create table t1(a int not null) engine=ndb; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY +insert into t1 values (1),(2),(3); alter table t1 add primary key (a); -show index from t1; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY +update t1 set a = 17 where a = 1; +select * from t1 order by a; alter table t1 drop primary key; -show index from t1; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY +update t1 set a = 1 where a = 17; +select * from t1 order by a; +drop table t1; + +# bug#31233 mysql_alter_table() fails to drop UNIQUE KEY +create table t1(a int not null) engine=ndb; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY +insert into t1 values (1),(2),(3); +create unique index pk on t1(a); +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY +update t1 set a = 17 where a = 1; +select * from t1 order by a; +alter table t1 drop index pk; +--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -d test t1 | grep PRIMARY +update t1 set a = 1 where a = 17; +select * from t1 order by a; drop table t1; # alter .. alter diff --git a/mysql-test/suite/ndb/t/ndb_restore_print.test b/mysql-test/suite/ndb/t/ndb_restore_print.test index 6dbbfdf5933..9a880f8968c 100644 --- a/mysql-test/suite/ndb/t/ndb_restore_print.test +++ b/mysql-test/suite/ndb/t/ndb_restore_print.test @@ -134,10 +134,14 @@ insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); --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 +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t2.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t3.txt +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/t4.txt --let ndb_restore_opts=--verbose=0 --print_data --hex --tab $MYSQLTEST_VARDIR/tmp --append --let ndb_restore_filter=test @@ -156,10 +160,10 @@ insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); --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 +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t2.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t3.txt +--remove_file $MYSQLTEST_VARDIR/tmp/t4.txt # now test some other datatypes drop table t1; |