Commit 2464f108 authored by unknown's avatar unknown
Browse files

Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/autopush/B26537-5.0-opt

parents 19948e8a 399bf23c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1940,4 +1940,10 @@ abcxx
select lpad('abc', cast(5 as unsigned integer), 'x');
lpad('abc', cast(5 as unsigned integer), 'x')
xxabc
SELECT UNHEX('G');
UNHEX('G')
NULL
SELECT UNHEX('G') IS NULL;
UNHEX('G') IS NULL
1
End of 5.0 tests
+6 −0
Original line number Diff line number Diff line
@@ -1008,4 +1008,10 @@ select repeat('a', cast(2 as unsigned int));
select rpad('abc', cast(5 as unsigned integer), 'x');
select lpad('abc', cast(5 as unsigned integer), 'x');

#
# Bug #26537: UNHEX() IS NULL comparison fails
#
SELECT UNHEX('G');
SELECT UNHEX('G') IS NULL;

--echo End of 5.0 tests
+5 −1
Original line number Diff line number Diff line
@@ -605,7 +605,11 @@ class Item_func_unhex :public Item_str_func
{
  String tmp_value;
public:
  Item_func_unhex(Item *a) :Item_str_func(a) {}
  Item_func_unhex(Item *a) :Item_str_func(a) 
  { 
    /* there can be bad hex strings */
    maybe_null= 1; 
  }
  const char *func_name() const { return "unhex"; }
  String *val_str(String *);
  void fix_length_and_dec()