summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-03-22 23:49:44 +0400
committerunknown <holyfoot/hf@hfmain.(none)>2007-03-22 23:49:44 +0400
commit1cc700a7411a5aa19c2e7e4767c4c9216b7bdffb (patch)
treecc2f1f26818537577224e50597d0764648b602d2 /sql/item_cmpfunc.cc
parent0b7ba9c2dc192e61b2c9b0f7a32cc8e15255af85 (diff)
parent4bd7d6c524a7b3b61fc7d346d83df94ffea18b7e (diff)
downloadmariadb-git-1cc700a7411a5aa19c2e7e4767c4c9216b7bdffb.tar.gz
Merge bk@192.168.21.1:mysql-5.1
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt sql/item_cmpfunc.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index ae66f292d0b..ffa6b4caf2a 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2458,7 +2458,8 @@ void in_decimal::set(uint pos, Item *item)
dec->len= DECIMAL_BUFF_LENGTH;
dec->fix_buffer_pointer();
my_decimal *res= item->val_decimal(dec);
- if (res != dec)
+ /* if item->val_decimal() is evaluated to NULL then res == 0 */
+ if (!item->null_value && res != dec)
my_decimal2decimal(res, dec);
}