mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Added flag to detect renaming of fields (not supported as fast alter table for ndbcluster): added test case
This commit is contained in:
@ -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%');
|
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
||||||
truncate ndb_show_tables;
|
truncate ndb_show_tables;
|
||||||
alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL;
|
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);
|
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;
|
drop index i1 on t1;
|
||||||
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
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%';
|
select 'no_copy' from ndb_show_tables where id = @t1_id and name like '%t1%';
|
||||||
|
@ -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;
|
LOAD DATA INFILE 'tmp.dat' INTO TABLE ndb_show_tables;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
# Ndb doesn't support renaming attributes on-line
|
||||||
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
set @t1_id = (select id from ndb_show_tables where name like '%t1%');
|
||||||
truncate ndb_show_tables;
|
truncate ndb_show_tables;
|
||||||
|
|
||||||
alter table t1 change tiny new_tiny tinyint(4) DEFAULT '0' NOT NULL;
|
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);
|
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;
|
drop index i1 on t1;
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
|
Reference in New Issue
Block a user