diff options
author | unknown <mskold/marty@mysql.com/linux.site> | 2006-09-12 16:04:52 +0200 |
---|---|---|
committer | unknown <mskold/marty@mysql.com/linux.site> | 2006-09-12 16:04:52 +0200 |
commit | 8b1d995987f0cdfb24814127c3d9218052c52891 (patch) | |
tree | 209b269b51bd055a553842f00920ae16bb0e6e5c /mysql-test | |
parent | 80684559c830da260676f56f11d931edc9d7cb82 (diff) | |
download | mariadb-git-8b1d995987f0cdfb24814127c3d9218052c52891.tar.gz |
Bug #21378 Alter table from X storage engine to NDB could cause data loss: Added warning if local table shadows ndb table
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ndb_multi.result | 32 | ||||
-rw-r--r-- | mysql-test/t/ndb_multi.test | 22 |
2 files changed, 54 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_multi.result b/mysql-test/r/ndb_multi.result index bd3af223a65..068d86b83e2 100644 --- a/mysql-test/r/ndb_multi.result +++ b/mysql-test/r/ndb_multi.result @@ -69,3 +69,35 @@ t3 t4 drop table t1, t2, t3, t4; drop table t1, t3, t4; +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(1),(3),(5); +select * from t1 order by c1; +c1 +1 +3 +5 +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(100),(344),(533); +select * from t1 order by c1; +c1 +100 +344 +533 +alter table t1 engine=ndb; +show tables; +Tables_in_test +t1 +Warnings: +Warning 1050 Local table t1 shadows cluster table +select * from t1 order by c1; +c1 +100 +344 +533 +drop table t1; +select * from t1 order by c1; +c1 +1 +3 +5 +drop table t1; diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test index 1183f2b283f..ce8ce420793 100644 --- a/mysql-test/t/ndb_multi.test +++ b/mysql-test/t/ndb_multi.test @@ -69,4 +69,26 @@ drop table t1, t2, t3, t4; connection server2; drop table t1, t3, t4; +# bug#21378 +connection server1; +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(1),(3),(5); +select * from t1 order by c1; + +connection server2; +create table t1(c1 int key)ENGINE=MyISAM; +insert into t1 values(100),(344),(533); +select * from t1 order by c1; + +connection server1; +alter table t1 engine=ndb; + +connection server2; +show tables; +select * from t1 order by c1; +drop table t1; + +connection server1; +select * from t1 order by c1; +drop table t1; # End of 4.1 tests |