diff options
author | unknown <mskold@mysql.com> | 2006-06-14 11:38:55 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2006-06-14 11:38:55 +0200 |
commit | d70df431284f76771f9965b6d620626b5f03392b (patch) | |
tree | eac61881fe73f00e0bb433847860390ee8d76d75 | |
parent | cf0374854b09e9e634964efef91325d2e61f3938 (diff) | |
download | mariadb-git-d70df431284f76771f9965b6d620626b5f03392b.tar.gz |
Added flag to detect renaming of fields (not supported as fast alter table for ndbcluster): added test case
-rw-r--r-- | mysql-test/r/ndb_alter_table.result | 7 | ||||
-rw-r--r-- | mysql-test/t/ndb_alter_table.test | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result index e506973f347..7facb5fa286 100644 --- a/mysql-test/r/ndb_alter_table.result +++ b/mysql-test/r/ndb_alter_table.result @@ -320,8 +320,13 @@ LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; set @t1_id = (select id from ndb_show_tables where name like '%t1%'); truncate ndb_show_tables; alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; +no_copy +set @t1_id = (select id from ndb_show_tables where name like '%t1%'); +truncate ndb_show_tables; create index i1 on t1(medium); -alter table t1 add index i2(long_int); +alter table t1 add index i2(new_tiny); drop index i1 on t1; LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test index 8e3b4a6ca89..73c612b203f 100644 --- a/mysql-test/t/ndb_alter_table.test +++ b/mysql-test/t/ndb_alter_table.test @@ -367,12 +367,23 @@ CREATE TEMPORARY TABLE ndb_show_tables (id INT, type VARCHAR(20), state VARCHAR( LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; --enable_warnings +# Ndb doesn't support renaming attributes on-line set @t1_id = (select id from ndb_show_tables where name like '%t1%'); truncate ndb_show_tables; alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL; +--disable_warnings +--exec $NDB_TOOLS_DIR/ndb_show_tables --p > $MYSQLTEST_VARDIR/master-data/test/tmp.dat +LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables; +--enable_warnings + +select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%'; + +set @t1_id = (select id from ndb_show_tables where name like '%t1%'); +truncate ndb_show_tables; + create index i1 on t1(medium); -alter table t1 add index i2(long_int); +alter table t1 add index i2(new_tiny); drop index i1 on t1; --disable_warnings |