summaryrefslogtreecommitdiff
path: root/mysql-test/suite/versioning
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-01 14:42:51 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-01 14:42:51 +0300
commit50a11f396af81aac6d5f51e8278ec9a7fa17e7c8 (patch)
tree1a695f030aa737b200e9271f9403971f8a571849 /mysql-test/suite/versioning
parent842da858b6c5b619bb5395ef4216f7e675b0f3a0 (diff)
parent9216114ce729733e6b0c4ce952bfdf57595ff387 (diff)
downloadmariadb-git-50a11f396af81aac6d5f51e8278ec9a7fa17e7c8.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'mysql-test/suite/versioning')
-rw-r--r--mysql-test/suite/versioning/r/partition.result30
-rw-r--r--mysql-test/suite/versioning/t/partition.test19
2 files changed, 35 insertions, 14 deletions
diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result
index b945ca4fb5b..cc9891a1f6e 100644
--- a/mysql-test/suite/versioning/r/partition.result
+++ b/mysql-test/suite/versioning/r/partition.result
@@ -348,11 +348,7 @@ insert t1 values (1);
delete from t1;
set timestamp=unix_timestamp('2001-02-04 10:20:50');
insert t1 values (2);
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
delete from t1;
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1';
subpartition_name partition_description table_rows
p1sp0 2001-02-04 00:00:00 1
@@ -395,6 +391,22 @@ i
explain partitions select * from t1 for system_time all where row_end = @ts;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1_p1sp0,p1_p1sp1 # NULL NULL NULL NULL # #
+#
+# MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL
+#
+set timestamp= unix_timestamp('2020-07-29 10:30:10');
+create or replace table t1 (a int) with system versioning
+partition by system_time interval 1 second (
+partition p0 history,
+partition p1 history,
+partition pc current
+);
+set timestamp= unix_timestamp('2020-07-29 10:30:14');
+insert into t1 values (1),(2),(3);
+show warnings;
+Level Code Message
+# Cleanup
+set timestamp= default;
## INTERVAL ... STARTS
create or replace table t1 (i int) with system versioning
partition by system_time interval 1 day starts 'a';
@@ -544,16 +556,10 @@ partition by system_time interval 1 day starts '2000-01-01 00:00:00'
partitions 3;
# we are warned when we push to present:
insert into t1 values (0);
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
set timestamp= unix_timestamp('2001-01-01 00:00:01');
update t1 set i= i + 1;
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
set timestamp= unix_timestamp('2001-01-01 00:00:02');
update t1 set i= i + 1;
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
select *, row_end from t1 partition (p0);
i row_end
select *, row_end from t1 partition (p1);
@@ -596,12 +602,8 @@ set timestamp= unix_timestamp('2000-01-02 00:00:01');
update t1 set i= i + 1;
set timestamp= unix_timestamp('2000-01-03 00:00:01');
update t1 set i= i + 1;
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
set timestamp= unix_timestamp('2000-01-04 00:00:01');
update t1 set i= i + 1;
-Warnings:
-Warning 4114 Versioned table `test`.`t1`: last HISTORY partition (`p1`) is out of INTERVAL, need more HISTORY partitions
alter table t1 add partition (partition p2 history, partition p3 history);
select *, row_end from t1 partition (p0);
i row_end
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 507e8d40256..a154cc37ae2 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -311,6 +311,25 @@ select * from t1 for system_time all where row_end = @ts;
--replace_column 5 # 10 # 11 #
explain partitions select * from t1 for system_time all where row_end = @ts;
+--echo #
+--echo # MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL
+--echo #
+
+set timestamp= unix_timestamp('2020-07-29 10:30:10');
+create or replace table t1 (a int) with system versioning
+ partition by system_time interval 1 second (
+ partition p0 history,
+ partition p1 history,
+ partition pc current
+ );
+
+set timestamp= unix_timestamp('2020-07-29 10:30:14');
+insert into t1 values (1),(2),(3);
+show warnings;
+
+--echo # Cleanup
+set timestamp= default;
+
--echo ## INTERVAL ... STARTS
--error ER_PART_WRONG_VALUE
create or replace table t1 (i int) with system versioning