From 04737330bea89437d8069d8eeb4bc484213dfdf0 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Sun, 3 Apr 2016 20:19:59 +0300 Subject: [PATCH] MDEV-9860: TokuDB ORDER BY DESC query is slower in 10.1 with ICP ON Implement ha_tokudb::cancel_pushed_idx_cond(). This is a conservative fix which follows the approach from the previous patch for: BUG#1000051: Query with simple join and ORDER BY takes thousands times... --- storage/tokudb/ha_tokudb.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h index e263cabb0d1..5b387924b1e 100644 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@ -602,6 +602,12 @@ public: // ICP introduced in MariaDB 5.5 Item* idx_cond_push(uint keyno, class Item* idx_cond); +#ifdef MARIADB_BASE_VERSION + void cancel_pushed_idx_cond() + { + invalidate_icp(); + } +#endif #if TOKU_INCLUDE_ALTER_56 public: