1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge branch '10.11' into 11.2

This commit is contained in:
Oleksandr Byelkin
2024-10-29 16:39:47 +01:00
660 changed files with 8148 additions and 3604 deletions

View File

@@ -222,6 +222,17 @@ DROP VIEW v1;
DROP TABLE t1;
# End of 10.4 tests
#
# MDEV-33470 Unique hash index is broken on DML for system-versioned table
#
create or replace table t (
c int, unique (c) using hash)
with system versioning;
insert into t values (0);
delete from t;
delete history from t;
drop table t;
# End of 10.5 tests
#
# MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT
#
# Don't auto-create new partition on DELETE HISTORY:

View File

@@ -126,7 +126,7 @@ row_end timestamp(6) as row end,
period for system_time (row_start, row_end))
with system versioning;
insert into t1(x, row_start, row_end) values (2, '1980-01-01 00:00:00', '1980-01-01 00:00:01');
ERROR 42S22: Unknown column 'row_start' in 'field list'
ERROR 42S22: Unknown column 'row_start' in 'INSERT INTO'
insert into t2(y, row_start, row_end) values (2, '1980-01-01 00:00:00', '1980-01-01 00:00:01');
ERROR HY000: The value specified for generated column 'row_start' in table 't2' has been ignored
set @@system_versioning_insert_history= 1;
@@ -154,11 +154,11 @@ insert into t1(x) values (1);
insert into t2(y) values (1);
update t1 set x= x + 1;
update t1 set row_start= '1971-01-01 00:00:00';
ERROR 42S22: Unknown column 'row_start' in 'field list'
ERROR 42S22: Unknown column 'row_start' in 'SET'
update t2 set row_start= '1971-01-01 00:00:00';
ERROR HY000: The value specified for generated column 'row_start' in table 't2' has been ignored
insert t1 (x) values (2) on duplicate key update x= 3, row_end= '1970-01-01 00:00:00';
ERROR 42S22: Unknown column 'row_end' in 'field list'
ERROR 42S22: Unknown column 'row_end' in 'UPDATE'
insert t2 (y) values (1) on duplicate key update y= 3, row_end= '1970-01-01 00:00:00';
ERROR HY000: The value specified for generated column 'row_end' in table 't2' has been ignored
insert t2 (y,row_end) values (1, '1970-01-01 00:00:00') on duplicate key update y= 3;
@@ -227,13 +227,13 @@ replace into t2 (a, row_start, row_end) select x, row_start, row_end from t1;
ERROR HY000: The value specified for generated column 'row_start' in table 't2' has been ignored
create or replace table t2 (a int primary key) with system versioning;
replace into t2 (a, row_start, row_end) values (1, '1980-01-01 00:00:00', '1980-01-01 00:00:01');
ERROR 42S22: Unknown column 'row_start' in 'field list'
ERROR 42S22: Unknown column 'row_start' in 'INSERT INTO'
replace into t2 (a, row_start, row_end) select x, row_start, row_end from t1;
ERROR 42S22: Unknown column 'row_start' in 'field list'
ERROR 42S22: Unknown column 'row_start' in 'INSERT INTO'
set @@system_versioning_insert_history= 1;
# REPLACE ignores system_versioning_insert_history
replace into t2 (a, row_end) values (0, '1980-01-01 00:00:00');
ERROR 42S22: Unknown column 'row_end' in 'field list'
ERROR 42S22: Unknown column 'row_end' in 'INSERT INTO'
replace into t3 (z, row_start) values (0, '1980-01-01 00:00:00');
ERROR HY000: The value specified for generated column 'row_start' in table 't3' has been ignored
replace into t3 values (0, '1980-01-01 00:00:00', '1981-01-01 00:00:00');

View File

@@ -464,7 +464,7 @@ set timestamp= default;
create table t1(x int) with system versioning;
insert into t1(x) values (1);
insert into t1(x, row_start, row_end) values (2, '1980-01-01 00:00:00', '1980-01-01 00:00:01');
ERROR 42S22: Unknown column 'row_start' in 'field list'
ERROR 42S22: Unknown column 'row_start' in 'INSERT INTO'
set @@system_versioning_insert_history= 1;
insert into t1(x, row_start, row_end) values (3, '1980-01-01 00:00:00', '1980-01-01 00:00:01');
update t1 set x= x + 1;

View File

@@ -50,6 +50,30 @@ x y
connection master;
drop table t1;
#
# MDEV-31297 Create table as select on system versioned tables do not work consistently on replication
#
connection master;
create table t engine=innodb with system versioning as select 1 as i;
show create table t;
Table Create Table
t CREATE TABLE `t` (
`i` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
select * from t;
i
1
connection slave;
show create table t;
Table Create Table
t CREATE TABLE `t` (
`i` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
select * from t;
i
1
connection master;
drop table t;
#
# MDEV-25347 DML events for auto-partitioned tables are written into binary log twice
#
flush binary logs;

View File

@@ -329,9 +329,9 @@ create or replace table t1 (a int) with system versioning;
create or replace view v1 as select * from t1;
create or replace procedure sp() update v1 set xx = 1;
call sp;
ERROR 42S22: Unknown column 'xx' in 'field list'
ERROR 42S22: Unknown column 'xx' in 'SET'
call sp;
ERROR 42S22: Unknown column 'xx' in 'field list'
ERROR 42S22: Unknown column 'xx' in 'SET'
drop procedure sp;
drop view v1;
drop table t1;