diff options
author | Monty <monty@mariadb.org> | 2016-11-21 10:00:52 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-09-09 14:11:58 +0300 |
commit | d2b2ea86d0bc361b4d042265810d52983ecc1dbf (patch) | |
tree | cf338d147681fe945c80f9bf56ed988511674574 | |
parent | 42c8b68b6ec90b36002b467b8d5f703c90a2574d (diff) | |
download | mariadb-git-d2b2ea86d0bc361b4d042265810d52983ecc1dbf.tar.gz |
Applied patch 001_mariadb-10.0.15.partition_cond_push.diff
- Added cond_push() and cond_pop() to ha_partition.cc
-rw-r--r-- | sql/ha_partition.cc | 33 | ||||
-rw-r--r-- | sql/ha_partition.h | 8 |
2 files changed, 41 insertions, 0 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 97bec3cbdf9..23d8a778580 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -9142,6 +9142,39 @@ TABLE_LIST *ha_partition::get_next_global_for_child() } +const COND *ha_partition::cond_push(const COND *cond) +{ + handler **file= m_file; + COND *res_cond = NULL; + DBUG_ENTER("ha_partition::cond_push"); + + do + { + if ((*file)->pushed_cond != cond) + { + if ((*file)->cond_push(cond)) + res_cond = (COND *) cond; + else + (*file)->pushed_cond = cond; + } + } while (*(++file)); + DBUG_RETURN(res_cond); +} + + +void ha_partition::cond_pop() +{ + handler **file= m_file; + DBUG_ENTER("ha_partition::cond_push"); + + do + { + (*file)->cond_pop(); + } while (*(++file)); + DBUG_VOID_RETURN; +} + + struct st_mysql_storage_engine partition_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; diff --git a/sql/ha_partition.h b/sql/ha_partition.h index f1bfb1307c4..bf9ec00ace8 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -1196,6 +1196,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, |