summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-01-12 17:08:52 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2011-01-12 17:08:52 +0200
commit7f9ce73d494f24e47c6fc5d41c004489a91958ad (patch)
treeda0982c91ebe6b9ce8a91a26ba09fb425b1341dc /sql/sql_select.cc
parent651313bf91d7771831de7228bb4130f0ac64c33a (diff)
parent33c78e328f4d8238b7b53c246e28bb44a97ee3c0 (diff)
downloadmariadb-git-7f9ce73d494f24e47c6fc5d41c004489a91958ad.tar.gz
merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 9e0a82aa342..8cc2ec6a0f8 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -6380,7 +6380,6 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
tab->select_cond=sel->cond=tmp;
/* Push condition to storage engine if this is enabled
and the condition is not guarded */
- tab->table->file->pushed_cond= NULL;
if (thd->variables.engine_condition_pushdown)
{
COND *push_cond=
@@ -9817,7 +9816,12 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
convert_blob_length);
if (orig_type == Item::REF_ITEM && orig_modify)
((Item_ref*)orig_item)->set_result_field(result);
- if (field->field->eq_def(result))
+ /*
+ Fields that are used as arguments to the DEFAULT() function already have
+ their data pointers set to the default value during name resulotion. See
+ Item_default_value::fix_fields.
+ */
+ if (orig_type != Item::DEFAULT_VALUE_ITEM && field->field->eq_def(result))
*default_field= field->field;
return result;
}