Loading mysql-test/r/archive.result +55 −0 Original line number Diff line number Diff line Loading @@ -12537,4 +12537,59 @@ SELECT c FROM t5 WHERE a IN (32, 23, 5); c NULL posterity drop table t1; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; v def abc hij 3r4f alter table t1 change v v2 varchar(32); select * from t1; v2 def abc hij 3r4f alter table t1 change v2 v varchar(64); select * from t1; v def abc hij 3r4f update t1 set v = 'lmn' where v = 'hij'; select * from t1; v def abc lmn 3r4f alter table t1 add i int auto_increment not null primary key first; select * from t1; i v 1 def 2 abc 3 lmn 4 3r4f update t1 set i=5 where i=3; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 change i i bigint; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); i v 4 3r4f drop table t1, t2, t4, t5; mysql-test/r/csv.result +55 −0 Original line number Diff line number Diff line Loading @@ -5017,3 +5017,58 @@ insert t1 values (1),(2),(3),(4),(5); truncate table t1; affected rows: 0 drop table t1; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; v def abc hij 3r4f alter table t1 change v v2 varchar(32); select * from t1; v2 def abc hij 3r4f alter table t1 change v2 v varchar(64); select * from t1; v def abc hij 3r4f update t1 set v = 'lmn' where v = 'hij'; select * from t1; v def abc lmn 3r4f alter table t1 add i int auto_increment not null primary key first; select * from t1; i v 1 def 2 abc 3 lmn 4 3r4f update t1 set i=5 where i=3; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 change i i bigint; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); i v 4 3r4f drop table t1; mysql-test/t/archive.test +28 −0 Original line number Diff line number Diff line Loading @@ -1456,6 +1456,34 @@ SELECT c FROM t5; SELECT c FROM t5 WHERE a =3; SELECT c FROM t5 WHERE a IN (32, 23, 5); # Adding this in case someone tries to add fast alter table and doesn't tes # it. # Some additional tests for new, faster alter table. Note that most of the # whole alter table code is being tested all around the test suite already. # drop table t1; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; # Fast alter, no copy performed alter table t1 change v v2 varchar(32); select * from t1; # Fast alter, no copy performed alter table t1 change v2 v varchar(64); select * from t1; update t1 set v = 'lmn' where v = 'hij'; select * from t1; # Regular alter table alter table t1 add i int auto_increment not null primary key first; select * from t1; update t1 set i=5 where i=3; select * from t1; alter table t1 change i i bigint; select * from t1; alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); # # Cleanup, test is over # Loading mysql-test/t/csv.test +26 −0 Original line number Diff line number Diff line Loading @@ -1418,3 +1418,29 @@ truncate table t1; -- truncate --disable_info drop table t1; # # Some additional tests for new, faster alter table. Note that most of the # whole alter table code is being tested all around the test suite already. # create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; # Fast alter, no copy performed alter table t1 change v v2 varchar(32); select * from t1; # Fast alter, no copy performed alter table t1 change v2 v varchar(64); select * from t1; update t1 set v = 'lmn' where v = 'hij'; select * from t1; # Regular alter table alter table t1 add i int auto_increment not null primary key first; select * from t1; update t1 set i=5 where i=3; select * from t1; alter table t1 change i i bigint; select * from t1; alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); drop table t1; sql/ha_archive.cc +3 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,9 @@ handlerton archive_hton = { NULL, /* Partition flags */ NULL, /* Alter table flags */ NULL, /* Alter interface */ HTON_NO_FLAGS HTON_NO_FLAGS, NULL, /* binlog_func */ NULL /* binlog_log_query */ }; static handler *archive_create_handler(TABLE_SHARE *table) Loading Loading
mysql-test/r/archive.result +55 −0 Original line number Diff line number Diff line Loading @@ -12537,4 +12537,59 @@ SELECT c FROM t5 WHERE a IN (32, 23, 5); c NULL posterity drop table t1; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; v def abc hij 3r4f alter table t1 change v v2 varchar(32); select * from t1; v2 def abc hij 3r4f alter table t1 change v2 v varchar(64); select * from t1; v def abc hij 3r4f update t1 set v = 'lmn' where v = 'hij'; select * from t1; v def abc lmn 3r4f alter table t1 add i int auto_increment not null primary key first; select * from t1; i v 1 def 2 abc 3 lmn 4 3r4f update t1 set i=5 where i=3; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 change i i bigint; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); i v 4 3r4f drop table t1, t2, t4, t5;
mysql-test/r/csv.result +55 −0 Original line number Diff line number Diff line Loading @@ -5017,3 +5017,58 @@ insert t1 values (1),(2),(3),(4),(5); truncate table t1; affected rows: 0 drop table t1; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; v def abc hij 3r4f alter table t1 change v v2 varchar(32); select * from t1; v2 def abc hij 3r4f alter table t1 change v2 v varchar(64); select * from t1; v def abc hij 3r4f update t1 set v = 'lmn' where v = 'hij'; select * from t1; v def abc lmn 3r4f alter table t1 add i int auto_increment not null primary key first; select * from t1; i v 1 def 2 abc 3 lmn 4 3r4f update t1 set i=5 where i=3; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 change i i bigint; select * from t1; i v 1 def 2 abc 5 lmn 4 3r4f alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); i v 4 3r4f drop table t1;
mysql-test/t/archive.test +28 −0 Original line number Diff line number Diff line Loading @@ -1456,6 +1456,34 @@ SELECT c FROM t5; SELECT c FROM t5 WHERE a =3; SELECT c FROM t5 WHERE a IN (32, 23, 5); # Adding this in case someone tries to add fast alter table and doesn't tes # it. # Some additional tests for new, faster alter table. Note that most of the # whole alter table code is being tested all around the test suite already. # drop table t1; create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; # Fast alter, no copy performed alter table t1 change v v2 varchar(32); select * from t1; # Fast alter, no copy performed alter table t1 change v2 v varchar(64); select * from t1; update t1 set v = 'lmn' where v = 'hij'; select * from t1; # Regular alter table alter table t1 add i int auto_increment not null primary key first; select * from t1; update t1 set i=5 where i=3; select * from t1; alter table t1 change i i bigint; select * from t1; alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); # # Cleanup, test is over # Loading
mysql-test/t/csv.test +26 −0 Original line number Diff line number Diff line Loading @@ -1418,3 +1418,29 @@ truncate table t1; -- truncate --disable_info drop table t1; # # Some additional tests for new, faster alter table. Note that most of the # whole alter table code is being tested all around the test suite already. # create table t1 (v varchar(32)); insert into t1 values ('def'),('abc'),('hij'),('3r4f'); select * from t1; # Fast alter, no copy performed alter table t1 change v v2 varchar(32); select * from t1; # Fast alter, no copy performed alter table t1 change v2 v varchar(64); select * from t1; update t1 set v = 'lmn' where v = 'hij'; select * from t1; # Regular alter table alter table t1 add i int auto_increment not null primary key first; select * from t1; update t1 set i=5 where i=3; select * from t1; alter table t1 change i i bigint; select * from t1; alter table t1 add unique key (i, v); select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); drop table t1;
sql/ha_archive.cc +3 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,9 @@ handlerton archive_hton = { NULL, /* Partition flags */ NULL, /* Alter table flags */ NULL, /* Alter interface */ HTON_NO_FLAGS HTON_NO_FLAGS, NULL, /* binlog_func */ NULL /* binlog_log_query */ }; static handler *archive_create_handler(TABLE_SHARE *table) Loading