diff options
author | Jacob Mathew <jacob.mathew@mariadb.com> | 2018-09-13 14:55:46 -0700 |
---|---|---|
committer | Jacob Mathew <jacob.mathew@mariadb.com> | 2018-09-13 14:55:46 -0700 |
commit | ed49f9aae2ad4f8d89294e91fba6a9ec704ded49 (patch) | |
tree | d0b906a799e8cdbb4ff4e36f93696b38f12b003c /storage/spider/mysql-test/spider/include | |
parent | 87609324e0eeb8f00810604e570a3b2b0b45d1a4 (diff) | |
download | mariadb-git-ed49f9aae2ad4f8d89294e91fba6a9ec704ded49.tar.gz |
MDEV-16912: Spider Order By column[datatime] limit 5 returns 3 rows
The problem occurs in 10.2 and earlier releases of MariaDB Server because the
Partition Engine was not pushing the engine conditions to the underlying
storage engine of each partition. This caused Spider to return the first 5
rows in the table with the data provided by the customer. 2 of the 5 rows
did not qualify the WHERE clause, so they were removed from the result set by
the server.
To fix the problem, I have back-ported support for engine condition pushdown
in the Partition Engine from MariaDB Server 10.3 to 10.2 and 10.1. In 10.3
and 10.4 I have merged the comments and the test case.
Author:
Jacob Mathew.
Reviewer:
Kentoku Shiba.
Merged:
Commit eb2ca3d on branch bb-10.2-MDEV-16912
Diffstat (limited to 'storage/spider/mysql-test/spider/include')
-rw-r--r-- | storage/spider/mysql-test/spider/include/init_child2_1.inc | 14 | ||||
-rw-r--r-- | storage/spider/mysql-test/spider/include/init_master_1.inc | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/storage/spider/mysql-test/spider/include/init_child2_1.inc b/storage/spider/mysql-test/spider/include/init_child2_1.inc index 10793649f94..782f538eb43 100644 --- a/storage/spider/mysql-test/spider/include/init_child2_1.inc +++ b/storage/spider/mysql-test/spider/include/init_child2_1.inc @@ -69,6 +69,20 @@ let $CHILD2_1_CREATE_TABLES6= ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; let $CHILD2_1_SELECT_TABLES6= SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a; +let $CHILD2_1_DROP_TABLES7= + DROP TABLE IF EXISTS ta_ob; +let $CHILD2_1_CREATE_TABLES7= + CREATE TABLE ta_ob ( + a VARCHAR(50) NOT NULL, + b VARCHAR(50) NULL DEFAULT NULL, + c VARCHAR(100) NULL DEFAULT NULL, + d DATETIME(0) NULL DEFAULT NULL, + e INT(11) NOT NULL, + f INT(10) NULL DEFAULT NULL, + PRIMARY KEY (a, e) + ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET; +let $CHILD2_1_SELECT_TABLES7= + SELECT * FROM ta_ob WHERE c LIKE "%510411106%" AND e = 510411 AND f != 1 ORDER BY d,c LIMIT 6 OFFSET 0; let $CHILD2_1_DROP_FT_TABLES= DROP TABLE IF EXISTS ft_r; let $CHILD2_1_CREATE_FT_TABLES= diff --git a/storage/spider/mysql-test/spider/include/init_master_1.inc b/storage/spider/mysql-test/spider/include/init_master_1.inc index 93947a8d454..2c45d0bd65d 100644 --- a/storage/spider/mysql-test/spider/include/init_master_1.inc +++ b/storage/spider/mysql-test/spider/include/init_master_1.inc @@ -94,6 +94,10 @@ if (!$VERSION_COMPILE_OS_WIN) CONNECTION='host "localhost", socket "$CHILD2_1_MYSOCK", user "root", password ""'; } +let $MASTER_1_COMMENT6_P_1_1= + COMMENT='database "auto_test_remote", table "ta_ob"' + PARTITION BY LIST COLUMNS (e) PARTITIONS 1 + (PARTITION pt1 values in (510411) COMMENT = 'srv "s_2_1"'); if ($VERSION_COMPILE_OS_WIN) { let $MASTER_1_COMMENT_FT_2_1= |