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

Merge branch '10.6' into 10.7

This commit is contained in:
Oleksandr Byelkin
2022-10-29 19:22:04 +02:00
141 changed files with 2878 additions and 585 deletions

View File

@@ -0,0 +1,20 @@
#
# simple tests that don't need to be run in multiple various combinations
#
set time_zone='+00:00';
--echo #
--echo # MDEV-29750 triggers can modify history
--echo #
set sql_mode='', timestamp=unix_timestamp('2010-10-10 10:10:10');
create table t (a int, b int as (a+1), s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning;
insert into t values (1,1, '2022-01-01','2023-01-01'),(2,2, '2022-02-02','2023-02-02');
create trigger tr before insert on t for each row set new.b=1, new.s = '2022-03-03', new.e = '2023-03-03';
insert into t (a) values (3),(4);
select * from t for system_time all;
drop table t;
set sql_mode=default, timestamp=default;
--echo #
--echo # End of 10.3 tests
--echo #

View File

@@ -1387,6 +1387,81 @@ insert into t select * from t;
# cleanup
drop table tcount, t;
--echo #
--echo # MDEV-19569 Assertion `table_list->table' failed in find_field_in_table_ref and Assertion `table_ref->table || table_ref->view' in Field_iterator_table_ref::set_field_iterator
--echo #
set timestamp=unix_timestamp('2000-01-01 00:00:00');
create table t1 (i int);
create table t2 (i int);
--error ER_SUBQUERIES_NOT_SUPPORTED
alter table t1 partition by system_time
interval (select i from t2) day (partition p1 history, partition pn current);
drop table t1;
--error ER_SUBQUERIES_NOT_SUPPORTED
create table t1 (id int) with system versioning
partition by system_time
interval (select i from t2) day (partition p1 history, partition pn current);
--error ER_PART_WRONG_VALUE
create table t1 (id int) with system versioning
partition by system_time
interval "hello" day (partition p1 history, partition pn current);
create table t1 (id int) with system versioning
partition by system_time
interval 3.893 day (partition p1 history, partition pn current);
drop table t1, t2;
create table t1 (id int) with system versioning
partition by system_time interval "3-11" year_month (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
create table t1 (id int) with system versioning
partition by system_time interval "3 11" day_hour (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
create table t1 (id int) with system versioning
partition by system_time interval "3 11:12" day_minute (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
create table t1 (id int) with system versioning
partition by system_time interval "3 11:12:13" day_second (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
create table t1 (id int) with system versioning
partition by system_time interval "11:12" hour_minute (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
create table t1 (id int) with system versioning
partition by system_time interval "11:12:13" hour_second (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
create table t1 (id int) with system versioning
partition by system_time interval "12:13" minute_second (partition p1 history, partition pn current);
--replace_result $default_engine DEFAULT_ENGINE
show create table t1;
drop table t1;
--error ER_PART_WRONG_VALUE
create table t1 (id int) with system versioning
partition by system_time interval "12:13.123" minute_microsecond (partition p1 history, partition pn current);
--echo #
--echo # End of 10.3 tests
--echo #