mirror of
https://github.com/MariaDB/server.git
synced 2025-11-27 05:41:41 +03:00
Merge branch '10.3' into 10.4
This commit is contained in:
@@ -13,14 +13,13 @@ t1 CREATE TABLE `t1` (
|
||||
`Sys_end` SYS_DATATYPE GENERATED ALWAYS AS ROW END INVISIBLE COMMENT 'end',
|
||||
PERIOD FOR SYSTEM_TIME (`Sys_start`, `Sys_end`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
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';
|
||||
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';
|
||||
table_catalog def
|
||||
table_schema test
|
||||
table_name t1
|
||||
table_type SYSTEM VERSIONED
|
||||
version 10
|
||||
table_rows 0
|
||||
avg_row_length 0
|
||||
data_free 0
|
||||
auto_increment NULL
|
||||
check_time NULL
|
||||
@@ -157,7 +156,7 @@ Sys_start bigint as row start invisible,
|
||||
Sys_end bigint unsigned as row end invisible,
|
||||
period for system_time (Sys_start, Sys_end)
|
||||
) with system versioning engine innodb;
|
||||
ERROR HY000: `Sys_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
|
||||
ERROR HY000: `Sys_start` must be of type BIGINT(20) UNSIGNED for system-versioned table `t1`
|
||||
create or replace table t1 (
|
||||
x14 int unsigned,
|
||||
Sys_start bigint unsigned as row start invisible,
|
||||
@@ -507,5 +506,19 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
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 HY000: `row_start` must be of type BIGINT(20) UNSIGNED for system-versioned table `t1`
|
||||
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;
|
||||
ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t1`
|
||||
drop database test;
|
||||
create database test;
|
||||
|
||||
@@ -128,7 +128,7 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=INNODB_OR_MYISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
) ENGINE=ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
## Case 2: ERROR on the master, it'll fail on the master, the slave won't see it
|
||||
connection master;
|
||||
set system_versioning_alter_history= ERROR;
|
||||
@@ -140,7 +140,7 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=INNODB_OR_MYISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
) ENGINE=ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
## Case 3: table is not versioned on the master, ALTER will work on the slave
|
||||
connection master;
|
||||
create or replace table t1 (a int);
|
||||
@@ -154,7 +154,7 @@ Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=INNODB_OR_MYISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
) ENGINE=ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
|
||||
connection master;
|
||||
drop table t1, t2;
|
||||
create table t1 (i int) with system versioning partition by system_time limit 8 ( partition p1 history, partition p2 history, partition pn current );
|
||||
|
||||
25
mysql-test/suite/versioning/r/update-big.result
Normal file
25
mysql-test/suite/versioning/r/update-big.result
Normal file
@@ -0,0 +1,25 @@
|
||||
#
|
||||
# MDEV-15458 Segfault in heap_scan() upon UPDATE after ADD SYSTEM VERSIONING
|
||||
#
|
||||
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;
|
||||
Reference in New Issue
Block a user