1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-27 05:41:41 +03:00

Merge branch 'bb-10.4-release' into bb-10.5-release

This commit is contained in:
Sergei Golubchik
2021-02-15 16:43:15 +01:00
316 changed files with 21851 additions and 3529 deletions

View File

@@ -136,9 +136,7 @@ t1 CREATE TABLE `t1` (
PARTITION `pn` CURRENT ENGINE = DEFAULT_ENGINE)
# merge and split doesn't (MDEV-19938)
create or replace table t1 (x int) with system versioning
partition by system_time partitions 3;
Warnings:
Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
partition by system_time limit 10 partitions 3;
alter table t1 reorganize partition p0, p1 into (partition p00 history);
ERROR HY000: REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers
alter table t1 reorganize partition p1 into (partition p1 history, partition p2 history);
@@ -952,15 +950,13 @@ select PARTITION_NAME, PARTITION_METHOD, PARTITION_DESCRIPTION from information_
PARTITION_NAME PARTITION_METHOD PARTITION_DESCRIPTION
p0 SYSTEM_TIME NULL
pn SYSTEM_TIME CURRENT
create or replace table t1 (x int) with system versioning partition by system_time partitions 4;
Warnings:
Warning 4115 Maybe missing parameters: no rotation condition for multiple HISTORY partitions.
create or replace table t1 (x int) with system versioning partition by system_time limit 10 partitions 4;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`x` int(11) DEFAULT NULL
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
PARTITION BY SYSTEM_TIME
PARTITION BY SYSTEM_TIME LIMIT 10
PARTITIONS 4
# 4 partitions are created: p0, p1, p2 and pn
select PARTITION_NAME, PARTITION_METHOD, PARTITION_DESCRIPTION from information_schema.partitions where table_name = 't1' order by PARTITION_NAME;

View File

@@ -399,3 +399,19 @@ a check_row(row_start, row_end)
1 HISTORICAL ROW
1 CURRENT ROW
drop tables t1, t2, t3;
#
# MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table with unique blob
create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
insert into t1 values (1, 1, 'foo'), (2, 11, 'bar');
update t1 set a = 3 where b <= 9;
update t1 set a = 3 where b <= 10;
drop table t1;
create table t1 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
create table t2 (a int, b int, c text, unique(c), key (b)) engine=myisam with system versioning;
insert into t1 values (1, 1, 'foo'), (2, 11, 'bar');
insert into t2 values (1, 1, 'foo'), (2, 11, 'bar');
update t1 set a = 3 where b <= 9;
update t2 set a = 3 where b <= 9;
update t1, t2 set t1.a = 3, t2.a = 3 where t1.b <= 10 and t2.b <= 10 and t1.b = t2.b;
drop tables t1, t2;