summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-11-12 12:42:42 +0200
committerunknown <monty@mashka.mysql.fi>2002-11-12 12:42:42 +0200
commite1c1abd0e189e4581b9a22aed923df37e535e89b (patch)
tree64ca040d65207f67531780b5d412e720c122c372 /sql/item_cmpfunc.cc
parent3165440cdec9d1270a2101973cb75e67e334dc5c (diff)
downloadmariadb-git-e1c1abd0e189e4581b9a22aed923df37e535e89b.tar.gz
Extended WEEK() to be able to handle ISO weeks.
unlink socket file if mysqld dies on startup Some optimization of AND expressions mysql-test/r/func_time.result: Update for new week() handling mysql-test/t/func_time.test: Update for new week() handling sql/item_cmpfunc.cc: Optimization of IF( and-expression,,) sql/item_cmpfunc.h: Optimization of AND expressions sql/item_timefunc.cc: Extended WEEK() to be able to handle ISO weeks. sql/mysqld.cc: unlink socket file if mysqld dies on startup sql/sql_base.cc: Fixed problem with SIGHUP and INSERT DELAYED tests/Makefile.am: Added missing myisam-big-rows.tst file to source distribution
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 93e24525d06..ee587289168 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -533,7 +533,6 @@ Item_func_if::fix_length_and_dec()
else
cached_result_type=arg1_type; // Should be INT_RESULT
}
- args[0]->top_level_item();
}
@@ -1122,6 +1121,8 @@ Item_cond::fix_fields(THD *thd,TABLE_LIST *tables)
#endif
item= *li.ref(); // new current item
}
+ if (abort_on_null)
+ item->top_level_item();
if (item->fix_fields(thd,tables))
return 1; /* purecov: inspected */
used_tables_cache|=item->used_tables();
@@ -1129,8 +1130,6 @@ Item_cond::fix_fields(THD *thd,TABLE_LIST *tables)
const_item_cache&=item->const_item();
if (item->maybe_null)
maybe_null=1;
- if (abort_on_null)
- item->top_level_item();
}
if (thd)
thd->cond_count+=list.elements;