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

Merge branch '10.10' into 10.11

This commit is contained in:
Oleksandr Byelkin
2022-11-02 10:42:34 +01:00
180 changed files with 5673 additions and 2618 deletions

View File

@@ -23,7 +23,7 @@ set timestamp=default;
--exec $MYSQL_DUMP --compact --as-of="1990-08-04 00:00" test t1
## Forged query protection
--echo #MYSQL_DUMP --compact --as-of="1990-08-04 00:00' where 'abc" test 2>&1
--replace_result mysqldump.exe mysqldump
--replace_result mariadb-dump.exe mariadb-dump
--error 1
--exec $MYSQL_DUMP --compact --as-of="1990-08-04 00:00' where 'abc" test 2>&1
@@ -68,13 +68,13 @@ select x, check_fields(x, row_start, row_end) from t2 for system_time all order
--exec $MYSQL_DUMP --dump-history --no-create-info --skip-comments --databases test > $TMP/dump_only_data.sql
--exec $MYSQL_DUMP --dump-history --compact test 2>&1 > $TMP/dump_history_compact.sql
--cat_file $TMP/dump_history_compact.sql
--replace_result mysqldump.exe mysqldump
--replace_result mariadb-dump.exe mariadb-dump
--error 1
--exec $MYSQL_DUMP --dump-history --as-of="1990-01-02 00:00" test 2>&1
--replace_result mysqldump.exe mysqldump
--replace_result mariadb-dump.exe mariadb-dump
--error 1
--exec $MYSQL_DUMP --dump-history --replace test 2>&1
--replace_result mysqldump.exe mysqldump
--replace_result mariadb-dump.exe mariadb-dump
--error 1
--exec $MYSQL_DUMP --dump-history --xml test 2>&1
@@ -157,10 +157,10 @@ insert t1 (x) values (1);
insert t1 (x) values (2);
delete from t1 where x=1;
--replace_result mysqldump.exe mysqldump
--replace_result mariadb-dump.exe mariadb-dump
--error 6
--exec $MYSQL_DUMP --dump-history test 2>&1 >/dev/null
--replace_regex /2,\d+,/2,XXX,/ /mysqldump\.exe/mysqldump/
--replace_regex /2,\d+,/2,XXX,/ /mariadb-dump\.exe/mariadb-dump/
--error 6
--exec $MYSQL_DUMP --force --dump-history --compact test 2>&1

View File

@@ -3,6 +3,26 @@
#
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 #
#
# simple tests that don't need to be run in multiple various combinations
#
set time_zone='+00:00';
--echo #
--echo # MDEV-29721 Inconsistency upon inserting history with visible system versioning columns
--echo #

View File

@@ -1401,6 +1401,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 #