summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-08-17 18:02:56 +0300
committermonty@hundin.mysql.fi <>2002-08-17 18:02:56 +0300
commitf7c8bd0e47b8a037f4eb0a7dca2816af97604d07 (patch)
treecb6c69dea958c68e0dfee4737f5b9a8f63b37aee /sql/item_cmpfunc.cc
parentca2e3aacff23f38a89bc005afe6bc34a616e561f (diff)
downloadmariadb-git-f7c8bd0e47b8a037f4eb0a7dca2816af97604d07.tar.gz
Portability fixes for 4.0.3 build.
Don't update MyISAM index file on UPDATE if index is not changed
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index e5544bc7bc2..923bbccde24 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -37,10 +37,16 @@ longlong Item_func_not::val_int()
return !null_value && value == 0 ? 1 : 0;
}
+/*
+ Convert a constant expression or string to an integer.
+ This is done when comparing DATE's of different formats and
+ also when comparing bigint to strings (in which case the string
+ is converted once to a bigint).
+*/
static bool convert_constant_item(Field *field, Item **item)
{
- if ((*item)->const_item())
+ if ((*item)->const_item() && (*item)->type() != Item::INT_ITEM)
{
if (!(*item)->save_in_field(field) &&
!((*item)->null_value))