summaryrefslogtreecommitdiff
path: root/sql/ha_partition.h
diff options
context:
space:
mode:
authorJacob Mathew <jacob.mathew@mariadb.com>2018-09-11 16:29:44 -0700
committerJacob Mathew <jacob.mathew@mariadb.com>2018-09-11 16:29:44 -0700
commiteb2ca3d44586ebfb887ee54ea5e5275ee4b25623 (patch)
treecd9be9a3dfd3aaa2c948bc639a361b69988996a8 /sql/ha_partition.h
parente76c4c06f18c0d09a296a60b6d00332620e98e53 (diff)
downloadmariadb-git-eb2ca3d44586ebfb887ee54ea5e5275ee4b25623.tar.gz
MDEV-16912: Spider Order By column[datatime] limit 5 returns 3 rowsbb-10.2-MDEV-16912
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. Author: Jacob Mathew. Reviewer: Kentoku Shiba.
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r--sql/ha_partition.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index a301cc3871c..286c6961531 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -1200,6 +1200,14 @@ public:
virtual bool is_crashed() const;
virtual int check_for_upgrade(HA_CHECK_OPT *check_opt);
+ /*
+ -----------------------------------------------------------------------
+ MODULE condition pushdown
+ -----------------------------------------------------------------------
+ */
+ virtual const COND *cond_push(const COND *cond);
+ virtual void cond_pop();
+
private:
int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags);
int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, uint part_id,