Commit 25a1fdd1 authored by Monty's avatar Monty

Applied patch 001_mariadb-10.0.15.partition_cond_push.diff

- Added cond_push() and cond_pop() to ha_partition.cc
parent c57e1bf5
......@@ -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 };
......
......@@ -1198,6 +1198,14 @@ class ha_partition :public handler
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment