Skip to content
Permalink
Browse files
Applied patch 001_mariadb-10.0.15.partition_cond_push.diff
- Added cond_push() and cond_pop() to ha_partition.cc
  • Loading branch information
montywi committed Dec 3, 2017
1 parent c57e1bf commit 25a1fdd
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
@@ -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,

0 comments on commit 25a1fdd

Please sign in to comment.