Commit 6950d57f authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.0

into serg.mylan:/usr/home/serg/Abk/mysql-5.0

parents df93b4fa 79a005fe
This diff is collapsed.
This diff is collapsed.
...@@ -1319,10 +1319,12 @@ static void fix_thd_mem_root(THD *thd, enum_var_type type) ...@@ -1319,10 +1319,12 @@ static void fix_thd_mem_root(THD *thd, enum_var_type type)
static void fix_trans_mem_root(THD *thd, enum_var_type type) static void fix_trans_mem_root(THD *thd, enum_var_type type)
{ {
#ifdef USING_TRANSACTIONS
if (type != OPT_GLOBAL) if (type != OPT_GLOBAL)
reset_root_defaults(&thd->transaction.mem_root, reset_root_defaults(&thd->transaction.mem_root,
thd->variables.trans_alloc_block_size, thd->variables.trans_alloc_block_size,
thd->variables.trans_prealloc_size); thd->variables.trans_prealloc_size);
#endif
} }
......
...@@ -5305,7 +5305,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) ...@@ -5305,7 +5305,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
if (!(tmp= add_found_match_trig_cond(first_inner_tab, tmp, 0))) if (!(tmp= add_found_match_trig_cond(first_inner_tab, tmp, 0)))
DBUG_RETURN(1); DBUG_RETURN(1);
tab->select_cond=sel->cond=tmp; tab->select_cond=sel->cond=tmp;
if (current_thd->variables.engine_condition_pushdown) if (join->thd->variables.engine_condition_pushdown)
{ {
tab->table->file->pushed_cond= NULL; tab->table->file->pushed_cond= NULL;
/* Push condition to handler */ /* Push condition to handler */
...@@ -5433,7 +5433,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) ...@@ -5433,7 +5433,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
join->thd->memdup((gptr) sel, sizeof(SQL_SELECT)); join->thd->memdup((gptr) sel, sizeof(SQL_SELECT));
tab->cache.select->cond=tmp; tab->cache.select->cond=tmp;
tab->cache.select->read_tables=join->const_table_map; tab->cache.select->read_tables=join->const_table_map;
if (current_thd->variables.engine_condition_pushdown && if (join->thd->variables.engine_condition_pushdown &&
(!tab->table->file->pushed_cond)) (!tab->table->file->pushed_cond))
{ {
/* Push condition to handler */ /* Push condition to handler */
...@@ -13008,8 +13008,22 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, ...@@ -13008,8 +13008,22 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
extra.append(')'); extra.append(')');
} }
else if (tab->select->cond) else if (tab->select->cond)
{
const COND *pushed_cond= tab->table->file->pushed_cond;
if (thd->variables.engine_condition_pushdown && pushed_cond)
{
extra.append("; Using where with pushed condition");
if (thd->lex->describe & DESCRIBE_EXTENDED)
{
extra.append(": ");
((COND *)pushed_cond)->print(&extra);
}
}
else
extra.append("; Using where"); extra.append("; Using where");
} }
}
if (key_read) if (key_read)
{ {
if (quick_type == QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX) if (quick_type == QUICK_SELECT_I::QS_TYPE_GROUP_MIN_MAX)
......
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