1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Modified handling of guarded predicates at condition pushdown to storage engine, to make valgrind happy

This commit is contained in:
unknown
2005-06-02 14:48:19 +02:00
parent b8c37b9502
commit 2d008198d2

View File

@ -5454,6 +5454,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
*/ */
if (cond) if (cond)
{ {
COND *unguarded= tmp;
/* /*
Because of QUICK_GROUP_MIN_MAX_SELECT there may be a select without Because of QUICK_GROUP_MIN_MAX_SELECT there may be a select without
a cond, so neutralize the hack above. a cond, so neutralize the hack above.
@ -5463,11 +5464,12 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab->select_cond=sel->cond=tmp; tab->select_cond=sel->cond=tmp;
/* Push condition to storage engine if this is enabled /* Push condition to storage engine if this is enabled
and the condition is not guarded */ and the condition is not guarded */
if (thd->variables.engine_condition_pushdown) tab->table->file->pushed_cond= NULL;
if (thd->variables.engine_condition_pushdown &&
unguarded == tmp)
{ {
COND *push_cond= COND *push_cond=
make_cond_for_table(tmp,current_map,current_map); make_cond_for_table(cond, current_map, current_map);
tab->table->file->pushed_cond= NULL;
if (push_cond) if (push_cond)
{ {
/* Push condition to handler */ /* Push condition to handler */