summaryrefslogtreecommitdiff
path: root/mysql-test/suite/versioning/t/partition.test
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2018-01-26 12:46:14 +0300
committerSergei Golubchik <serg@mariadb.org>2018-02-23 15:33:22 +0100
commitdf0e1817c716a4b2c48d2f83d55f4d2549168843 (patch)
tree7767d619d9d7ab7a3faf5f0aab16dd756f7598b1 /mysql-test/suite/versioning/t/partition.test
parent45e1c9bb6d32fb7a2fe2e59845ccc3389223d7c9 (diff)
downloadmariadb-git-df0e1817c716a4b2c48d2f83d55f4d2549168843.tar.gz
Vers SQL: partition rotation by INTERVAL fix
Update partition stats on ha_partition::write_row()
Diffstat (limited to 'mysql-test/suite/versioning/t/partition.test')
-rw-r--r--mysql-test/suite/versioning/t/partition.test25
1 files changed, 20 insertions, 5 deletions
diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test
index 1dea9f7c69c..d16bb4abc5c 100644
--- a/mysql-test/suite/versioning/t/partition.test
+++ b/mysql-test/suite/versioning/t/partition.test
@@ -122,7 +122,6 @@ alter table t1 add partition (partition px history);
--echo ## INSERT, UPDATE, DELETE
-
create or replace table t1 (x int)
with system versioning
partition by system_time (
@@ -241,6 +240,7 @@ partition by system_time interval 0 second (
partition p1 history,
partition pn current);
+--echo ### ha_partition::update_row() check
create or replace table t1 (x int)
with system versioning
partition by system_time interval 1 second (
@@ -248,14 +248,29 @@ partition by system_time interval 1 second (
partition p1 history,
partition pn current);
-insert into t1 values (1), (2), (3);
+insert into t1 values (1), (2), (3), (4);
select * from t1 partition (pn);
-delete from t1;
-select * from t1 partition (p0);
+delete from t1 where x < 3;
--sleep 2
-insert into t1 values (4);
delete from t1;
+
+select * from t1 partition (p0) order by x;
+select * from t1 partition (p1) order by x;
+
+--echo ### ha_partition::write_row() check
+create or replace table t1 (x int)
+with system versioning
+partition by system_time interval 1 second (
+ partition p0 history,
+ partition p1 history,
+ partition pn current);
+
+insert into t1 values (1);
+update t1 set x= 2;
+sleep 2;
+update t1 set x= 3;
+select * from t1 partition (p0);
select * from t1 partition (p1);
--echo ## Subpartitions