Loading Docs/manual.texi +6 −1 Original line number Diff line number Diff line Loading @@ -46916,6 +46916,10 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.51 @itemize @bullet @item Removed BDB documentation. @item Fixed mit-pthreads to compile with glibc 2.2 (needed for @code{make dist}). @item Fixed the @code{FLOAT(X+1,X)} is not converted to @code{FLOAT(X+2,X)}. (This also affected @code{DECIMAL}, @code{DOUBLE} and @code{REAL} types) @item Loading @@ -46929,7 +46933,8 @@ Fixed that underflowed decimal fields is not zero filled. If we get an overflow when inserting @code{'+11111'} for @code{decimal(5,0) unsigned} columns, we will just drop the sign. @item Fixed bug with @code{ISNULL(expression_which_cannot_be_null)}. Fixed optimization bug with @code{ISNULL(expression_which_cannot_be_null)} and @code{ISNULL(constant_expression)}. @item Fixed host lookup bug in the glibc library that we used with the 3.23.50 Linux-x86 binaries. mysql-test/r/join.result +3 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ d d 0000-00-00 NULL d 0000-00-00 d 2001-08-01 0000-00-00 COUNT(t1.Title) 1 COUNT(t1.Title) Loading mysql-test/t/join.test +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ CREATE TABLE t2 (d DATE NOT NULL); INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00'); SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL; SELECT * from t1 WHERE t1.d IS NULL; SELECT * FROM t1 WHERE 1/0 IS NULL; DROP TABLE t1,t2; # Loading sql/item_cmpfunc.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1211,7 +1211,7 @@ longlong Item_func_isnull::val_int() This has to be here because of the test in update_used_tables(). */ if (!used_tables_cache) return 0; return cached_value; (void) args[0]->val(); return (args[0]->null_value) ? 1 : 0; } Loading sql/item_cmpfunc.h +7 −0 Original line number Diff line number Diff line Loading @@ -429,6 +429,7 @@ class Item_func_in :public Item_int_func class Item_func_isnull :public Item_bool_func { longlong cached_value; public: Item_func_isnull(Item *a) :Item_bool_func(a) {} longlong val_int(); Loading @@ -449,6 +450,12 @@ class Item_func_isnull :public Item_bool_func args[0]->update_used_tables(); used_tables_cache=args[0]->used_tables(); } if (!used_tables_cache) { /* Remember if the value is always NULL or never NULL */ args[0]->val(); cached_value= args[0]->null_value ? (longlong) 1 : (longlong) 0; } } optimize_type select_optimize() const { return OPTIMIZE_NULL; } }; Loading Loading
Docs/manual.texi +6 −1 Original line number Diff line number Diff line Loading @@ -46916,6 +46916,10 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.51 @itemize @bullet @item Removed BDB documentation. @item Fixed mit-pthreads to compile with glibc 2.2 (needed for @code{make dist}). @item Fixed the @code{FLOAT(X+1,X)} is not converted to @code{FLOAT(X+2,X)}. (This also affected @code{DECIMAL}, @code{DOUBLE} and @code{REAL} types) @item Loading @@ -46929,7 +46933,8 @@ Fixed that underflowed decimal fields is not zero filled. If we get an overflow when inserting @code{'+11111'} for @code{decimal(5,0) unsigned} columns, we will just drop the sign. @item Fixed bug with @code{ISNULL(expression_which_cannot_be_null)}. Fixed optimization bug with @code{ISNULL(expression_which_cannot_be_null)} and @code{ISNULL(constant_expression)}. @item Fixed host lookup bug in the glibc library that we used with the 3.23.50 Linux-x86 binaries.
mysql-test/r/join.result +3 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ d d 0000-00-00 NULL d 0000-00-00 d 2001-08-01 0000-00-00 COUNT(t1.Title) 1 COUNT(t1.Title) Loading
mysql-test/t/join.test +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ CREATE TABLE t2 (d DATE NOT NULL); INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00'); SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL; SELECT * from t1 WHERE t1.d IS NULL; SELECT * FROM t1 WHERE 1/0 IS NULL; DROP TABLE t1,t2; # Loading
sql/item_cmpfunc.cc +1 −1 Original line number Diff line number Diff line Loading @@ -1211,7 +1211,7 @@ longlong Item_func_isnull::val_int() This has to be here because of the test in update_used_tables(). */ if (!used_tables_cache) return 0; return cached_value; (void) args[0]->val(); return (args[0]->null_value) ? 1 : 0; } Loading
sql/item_cmpfunc.h +7 −0 Original line number Diff line number Diff line Loading @@ -429,6 +429,7 @@ class Item_func_in :public Item_int_func class Item_func_isnull :public Item_bool_func { longlong cached_value; public: Item_func_isnull(Item *a) :Item_bool_func(a) {} longlong val_int(); Loading @@ -449,6 +450,12 @@ class Item_func_isnull :public Item_bool_func args[0]->update_used_tables(); used_tables_cache=args[0]->used_tables(); } if (!used_tables_cache) { /* Remember if the value is always NULL or never NULL */ args[0]->val(); cached_value= args[0]->null_value ? (longlong) 1 : (longlong) 0; } } optimize_type select_optimize() const { return OPTIMIZE_NULL; } }; Loading