At 23:14 +0300 8/9/02, Sinisa@stripped wrote:
>Below is the list of changes that have just been commited into a local
>3.23. repository of Sinisa. When Sinisa does a push, they will be
>propogaged to the main repository and within 24 hours after the push into
>the public repository. For information on how to access
>the public repository see
>http://www.mysql.com/doc/I/n/Installing_source_tree.html
>
>ChangeSet@stripped, 2002-08-09 23:14:02+03:00, Sinisa@stripped
> A change in IF behaviour that several users asked for ...
[clipped]
># This is a BitKeeper patch. What follows are the unified diffs for the
># set of deltas contained in the patch. The rest of the patch, the part
># that BitKeeper cares about, is below these diffs.
># User: Sinisa
># Host: sinisa.nasamreza.org
># Root: /mnt/work/mysql
>
>--- 1.812/Docs/manual.texi Wed Aug 7 21:57:31 2002
>+++ 1.813/Docs/manual.texi Fri Aug 9 23:14:00 2002
>@@ -46924,6 +46924,14 @@
> * News-3.23.0:: Changes in release 3.23.0
> @end menu
>
>+@node News-3.23.53, News-3.23.52, News-3.23.x, News-3.23.x
>+@appendixsubsec Changes in release 3.23.53
>+@itemize @bullet
>+@item
>+Changed behaviour that IF(condition,column,NULL) returns column type
>+@end itemize
Does this mean that if one of the return values is NULL and the other isn't,
the return value has the same type as the non-NULL value, regardless of which
of the two values is returned? (That's what it looks like to me from the
code below.)
>+
>+
> @node News-3.23.52, News-3.23.51, News-3.23.x, News-3.23.x
> @appendixsubsec Changes in release 3.23.52
> @itemize @bullet
>
>--- 1.18/sql/item_cmpfunc.cc Wed May 15 01:01:24 2002
>+++ 1.19/sql/item_cmpfunc.cc Fri Aug 9 23:14:01 2002
>@@ -494,6 +494,12 @@
> decimals=max(args[1]->decimals,args[2]->decimals);
> enum Item_result arg1_type=args[1]->result_type();
> enum Item_result arg2_type=args[2]->result_type();
>+ bool null1=args[1]->null_value;
>+ bool null2=args[2]->null_value;
>+ if (null1 && !null2)
>+ arg1_type=arg2_type;
>+ else if (!null1 && null2)
>+ arg2_type=arg1_type;
> binary=1;
> if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT)
> {
[clipped]