diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-19 20:55:37 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-05-19 20:55:37 +0200 |
commit | c07325f932abef2032b2e56532f6cb615e2a1161 (patch) | |
tree | 754ca158e45ebc014e5cbeaf4c3e7581f9575d76 /mysql-test/suite/versioning/t | |
parent | 7f8187bc432f79afe4c0549d68845a68e6c159ab (diff) | |
parent | 2ae83affef5a4d89f38272db31a400f968279a7a (diff) | |
download | mariadb-git-c07325f932abef2032b2e56532f6cb615e2a1161.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test/suite/versioning/t')
-rw-r--r-- | mysql-test/suite/versioning/t/create.test | 18 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/rpl.test | 6 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/update-big.test | 34 |
3 files changed, 54 insertions, 4 deletions
diff --git a/mysql-test/suite/versioning/t/create.test b/mysql-test/suite/versioning/t/create.test index 8103330c722..733b5057c20 100644 --- a/mysql-test/suite/versioning/t/create.test +++ b/mysql-test/suite/versioning/t/create.test @@ -15,7 +15,7 @@ eval create table t1 ( --replace_result $default_engine DEFAULT_ENGINE $sys_datatype_expl SYS_DATATYPE show create table t1; ---query_vertical select table_catalog,table_schema,table_name,table_type,version,table_rows,avg_row_length,data_free,auto_increment,check_time,table_collation,checksum,create_options,table_comment from information_schema.tables where table_name='t1' +--query_vertical select table_catalog,table_schema,table_name,table_type,version,table_rows,data_free,auto_increment,check_time,table_collation,checksum,create_options,table_comment from information_schema.tables where table_name='t1' --query_vertical select table_catalog,table_schema,table_name,column_name,ordinal_position,column_default,character_maximum_length,character_octet_length,character_set_name,collation_name,column_key,extra,column_comment,is_generated,generation_expression from information_schema.columns where table_name='t1' --echo # Implicit fields test @@ -371,5 +371,21 @@ create or replace table t1 (i int) with system versioning as select 1 as i; --replace_result $default_engine DEFAULT_ENGINE show create table t1; +--error ER_VERS_FIELD_WRONG_TYPE +create or replace table t1 ( + a int, + row_start bigint as row start, + row_end bigint as row end, + period for system_time (row_start, row_end) +) engine=innodb with system versioning; + +--error ER_VERS_FIELD_WRONG_TYPE +create or replace table t1 ( + a int, + row_start bigint as row start, + row_end bigint as row end, + period for system_time (row_start, row_end) +) engine=myisam with system versioning; + drop database test; create database test; diff --git a/mysql-test/suite/versioning/t/rpl.test b/mysql-test/suite/versioning/t/rpl.test index e59d41c38a3..b5be68feece 100644 --- a/mysql-test/suite/versioning/t/rpl.test +++ b/mysql-test/suite/versioning/t/rpl.test @@ -96,7 +96,7 @@ create or replace table t1 (a int) with system versioning; set system_versioning_alter_history= KEEP; alter table t1 add column b int; sync_slave_with_master; ---replace_result InnoDB INNODB_OR_MYISAM MyISAM INNODB_OR_MYISAM +--replace_result InnoDB ENGINE MyISAM ENGINE MEMORY ENGINE show create table t1; --echo ## Case 2: ERROR on the master, it'll fail on the master, the slave won't see it @@ -105,7 +105,7 @@ set system_versioning_alter_history= ERROR; --error ER_VERS_ALTER_NOT_ALLOWED alter table t1 drop column b; sync_slave_with_master; ---replace_result InnoDB INNODB_OR_MYISAM MyISAM INNODB_OR_MYISAM +--replace_result InnoDB ENGINE MyISAM ENGINE MEMORY ENGINE show create table t1; --echo ## Case 3: table is not versioned on the master, ALTER will work on the slave @@ -116,7 +116,7 @@ create or replace table t1 (a int) with system versioning; connection master; alter table t1 add column b int; sync_slave_with_master; ---replace_result InnoDB INNODB_OR_MYISAM MyISAM INNODB_OR_MYISAM +--replace_result InnoDB ENGINE MyISAM ENGINE MEMORY ENGINE show create table t1; connection master; diff --git a/mysql-test/suite/versioning/t/update-big.test b/mysql-test/suite/versioning/t/update-big.test new file mode 100644 index 00000000000..175bfc79a48 --- /dev/null +++ b/mysql-test/suite/versioning/t/update-big.test @@ -0,0 +1,34 @@ +source include/big_test.inc; +source suite/versioning/engines.inc; +source suite/versioning/common.inc; + +--echo # +--echo # MDEV-15458 Segfault in heap_scan() upon UPDATE after ADD SYSTEM VERSIONING +--echo # +create or replace table t1 (a int); +insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8); +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; +insert into t1 select * from t1; + +--connect (con1,localhost,root,,test) +alter table t1 add system versioning; + +--connection default +update t1 set a= 7 where a = 3; +update t1 set a= 2 where a = 7; +update t1 set a= 5 where a = 2; +update t1 set a= 1 where a = 5; +update t1 set a= 8 where a = 1; +update t1 set a= 4 where a = 8; +update t1 set a= 6; + +drop table t1; + +source suite/versioning/common_finish.inc; |