mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -659,6 +659,30 @@ update t1 set f=pk;
|
||||
delete from t1;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-22413 Server hangs upon UPDATE/DELETE on a view reading from versioned partitioned table
|
||||
#
|
||||
create or replace table t1 (f char(6)) engine innodb with system versioning;
|
||||
insert into t1 values (null);
|
||||
update t1 set f= 'foo';
|
||||
update t1 set f= 'bar';
|
||||
create or replace view v1 as select * from t1 for system_time all;
|
||||
update v1 set f = '';
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
create or replace table t1 (f char(6)) engine innodb with system versioning
|
||||
partition by system_time limit 1
|
||||
(partition p1 history, partition p2 history, partition pn current);
|
||||
insert into t1 values (null);
|
||||
update t1 set f= 'foo';
|
||||
update t1 set f= 'bar';
|
||||
create or replace view v1 as select * from t1 for system_time all;
|
||||
update v1 set f= '';
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
delete from v1;
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
# End of 10.3 tests
|
||||
#
|
||||
# MDEV-22283 Server crashes in key_copy or unexpected error 156: The table already existed in the storage engine
|
||||
#
|
||||
create table t1 (a int primary key) engine=aria page_checksum=0
|
||||
@ -678,3 +702,4 @@ partition by system_time (partition p1 history, partition pn current);
|
||||
insert into t1 values (1);
|
||||
replace into t1 values (1);
|
||||
drop table t1;
|
||||
# End of 10.4 tests
|
||||
|
@ -65,3 +65,16 @@ partition by range columns (a, row_start) (
|
||||
partition p1 values less than (100, 100)
|
||||
);
|
||||
ERROR HY000: Transaction-precise system-versioned tables do not support partitioning by ROW START or ROW END
|
||||
#
|
||||
# MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table
|
||||
#
|
||||
create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i))
|
||||
engine=innodb with system versioning partition by key() partitions 2;
|
||||
insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b');
|
||||
alter table t1 drop system versioning;
|
||||
replace into t1 select * from t1;
|
||||
select * from t1 where i > 0 or pk = 1000 limit 1;
|
||||
pk i c
|
||||
1 1 a
|
||||
drop table t1;
|
||||
# End of 10.3 tests
|
||||
|
@ -242,8 +242,7 @@ ERROR HY000: Table `t1` is not system-versioned
|
||||
create or replace table t1 (x int) with system versioning;
|
||||
insert into t1 values (1);
|
||||
select * from t1 for system_time all for update;
|
||||
x
|
||||
1
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
create or replace table t1 (a int not null auto_increment primary key) with system versioning;
|
||||
select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1;
|
||||
a
|
||||
|
@ -233,8 +233,7 @@ ERROR HY000: Table `t1` is not system-versioned
|
||||
create or replace table t1 (x int) with system versioning;
|
||||
insert into t1 values (1);
|
||||
select * from t1 for system_time as of now() for update;
|
||||
x
|
||||
1
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
create or replace table t1 (a int not null auto_increment primary key) with system versioning;
|
||||
select * from (t1 as t2 left join t1 as t3 using (a)) natural left join t1;
|
||||
a
|
||||
|
@ -595,6 +595,39 @@ update t1 set f=pk;
|
||||
delete from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22413 Server hangs upon UPDATE/DELETE on a view reading from versioned partitioned table
|
||||
--echo #
|
||||
create or replace table t1 (f char(6)) engine innodb with system versioning;
|
||||
|
||||
insert into t1 values (null);
|
||||
update t1 set f= 'foo';
|
||||
update t1 set f= 'bar';
|
||||
|
||||
create or replace view v1 as select * from t1 for system_time all;
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
update v1 set f = '';
|
||||
|
||||
create or replace table t1 (f char(6)) engine innodb with system versioning
|
||||
partition by system_time limit 1
|
||||
(partition p1 history, partition p2 history, partition pn current);
|
||||
|
||||
insert into t1 values (null);
|
||||
update t1 set f= 'foo';
|
||||
update t1 set f= 'bar';
|
||||
|
||||
create or replace view v1 as select * from t1 for system_time all;
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
update v1 set f= '';
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
delete from v1;
|
||||
|
||||
# cleanup
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22283 Server crashes in key_copy or unexpected error 156: The table already existed in the storage engine
|
||||
--echo #
|
||||
@ -614,4 +647,6 @@ replace into t1 values (1);
|
||||
# cleanup
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
||||
--source suite/versioning/common_finish.inc
|
||||
|
@ -77,4 +77,17 @@ partition by range columns (a, row_start) (
|
||||
partition p1 values less than (100, 100)
|
||||
);
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18794 Assertion `!m_innodb' failed in ha_partition::cmp_ref upon SELECT from partitioned table
|
||||
--echo #
|
||||
create or replace table t1 (pk int auto_increment, i int, c char(1), primary key (pk), key(i))
|
||||
engine=innodb with system versioning partition by key() partitions 2;
|
||||
insert into t1 (i, c) values (1, 'a'), (2, 'b'), (null, 'c'), (null, 'b');
|
||||
alter table t1 drop system versioning;
|
||||
replace into t1 select * from t1;
|
||||
select * from t1 where i > 0 or pk = 1000 limit 1;
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.3 tests
|
||||
|
||||
--source suite/versioning/common_finish.inc
|
||||
|
@ -149,6 +149,7 @@ select * from t1 for system_time all;
|
||||
|
||||
create or replace table t1 (x int) with system versioning;
|
||||
insert into t1 values (1);
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
select * from t1 for system_time all for update;
|
||||
|
||||
create or replace table t1 (a int not null auto_increment primary key) with system versioning;
|
||||
|
@ -128,6 +128,7 @@ select * from t1 for system_time all;
|
||||
|
||||
create or replace table t1 (x int) with system versioning;
|
||||
insert into t1 values (1);
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
select * from t1 for system_time as of now() for update;
|
||||
|
||||
create or replace table t1 (a int not null auto_increment primary key) with system versioning;
|
||||
|
Reference in New Issue
Block a user