summaryrefslogtreecommitdiff
blob: 1511768e3b4d6db147f8b8b22741bb85de8c1f69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Gentoo bug #171934
MySQL bug #27513

diff -Naur mysql-5.0.38/libmysqld/item_cmpfunc.cc mysql-5.0.38-patched/libmysqld/item_cmpfunc.cc
--- mysql-5.0.38/libmysqld/item_cmpfunc.cc	2007-03-20 20:12:46.000000000 +0100
+++ mysql-5.0.38-patched/libmysqld/item_cmpfunc.cc	2007-04-12 20:41:32.000000000 +0200
@@ -2423,7 +2423,7 @@
   dec->len= DECIMAL_BUFF_LENGTH;
   dec->fix_buffer_pointer();
   my_decimal *res= item->val_decimal(dec);
-  if (res != dec)
+  if (!item->null_value && res != dec)
     my_decimal2decimal(res, dec);
 }
 
diff -Naur mysql-5.0.38/sql/item_cmpfunc.cc mysql-5.0.38-patched/sql/item_cmpfunc.cc
--- mysql-5.0.38/sql/item_cmpfunc.cc	2007-03-20 20:12:46.000000000 +0100
+++ mysql-5.0.38-patched/sql/item_cmpfunc.cc	2007-04-12 20:41:36.000000000 +0200
@@ -2423,7 +2423,7 @@
   dec->len= DECIMAL_BUFF_LENGTH;
   dec->fix_buffer_pointer();
   my_decimal *res= item->val_decimal(dec);
-  if (res != dec)
+  if (!item->null_value && res != dec)
     my_decimal2decimal(res, dec);
 }