1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixes for condition pushdown to storage engine based on comments from code review

mysql-test/r/ndb_condition_pushdown.result:
  Added more tests  for condition pushdown to storage engine based on comments from code review
mysql-test/t/ndb_condition_pushdown.test:
  Added more tests  for condition pushdown to storage engine based on comments from code review
This commit is contained in:
unknown
2005-02-23 15:51:26 +01:00
parent a2bb52c748
commit 9968b41dbf
6 changed files with 489 additions and 301 deletions

View File

@ -5305,7 +5305,12 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
DBUG_RETURN(1);
tab->select_cond=sel->cond=tmp;
if (current_thd->variables.engine_condition_pushdown)
tab->table->file->cond_push(tmp); // Push condition to handler
{
tab->table->file->pushed_cond= NULL;
/* Push condition to handler */
if (!tab->table->file->cond_push(tmp))
tab->table->file->pushed_cond= tmp;
}
}
else
tab->select_cond= sel->cond= NULL;
@ -5428,8 +5433,12 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab->cache.select->cond=tmp;
tab->cache.select->read_tables=join->const_table_map;
if (current_thd->variables.engine_condition_pushdown &&
(tmp != tab->select_cond))
tab->table->file->cond_push(tmp); // Push condition to handler
(!tab->table->file->pushed_cond))
{
/* Push condition to handler */
if (!tab->table->file->cond_push(tmp))
tab->table->file->pushed_cond= tmp;
}
}
}
}