diff options
author | mskold@mysql.com <> | 2005-04-04 21:38:05 +0200 |
---|---|---|
committer | mskold@mysql.com <> | 2005-04-04 21:38:05 +0200 |
commit | 8e19abff0eeab7462141c25270c369e2331372ff (patch) | |
tree | 9020bc372260c1188875984f0a16185401e79ef8 /sql/records.cc | |
parent | 04f8e164fb4ec9c35822a44b1296c69f19ab6d2e (diff) | |
download | mariadb-git-8e19abff0eeab7462141c25270c369e2331372ff.tar.gz |
Fix Bug #9517 Condition pushdown to storage engine does not work for update/delete
Diffstat (limited to 'sql/records.cc')
-rw-r--r-- | sql/records.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/records.cc b/sql/records.cc index 00da1ac1adc..28a8e9a9aa5 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -128,6 +128,13 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, VOID(table->file->extra_opt(HA_EXTRA_CACHE, thd->variables.read_buff_size)); } + /* Condition pushdown to storage engine */ + if (thd->variables.engine_condition_pushdown && + select && select->cond && + select->cond->used_tables() & table->map && + !(select->quick || table->file->pushed_cond)) + table->file->cond_push(select->cond); + DBUG_VOID_RETURN; } /* init_read_record */ |