Loading Docs/manual.texi +12 −2 Original line number Diff line number Diff line Loading @@ -29916,6 +29916,9 @@ stored into a temporary table) is calculated in MySQL Version @item expr2 or expr3 returns an integer @tab integer @end multitable If expr2 and expr3 are strings, then the result is case sensitive if both strings are case sensitive. (Starting from 3.23.51) @findex CASE @item CASE value WHEN [compare-value] THEN result [WHEN [compare-value] THEN result ...] [ELSE result] END @item CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END Loading Loading @@ -46854,6 +46857,7 @@ users use this code as the rest of the code and because of this we are not yet 100% confident in this code. @menu * News-3.23.51:: * News-3.23.50:: Changes in release 3.23.50 * News-3.23.49:: Changes in release 3.23.49 * News-3.23.48:: Changes in release 3.23.48 Loading Loading @@ -46908,9 +46912,15 @@ not yet 100% confident in this code. * News-3.23.0:: Changes in release 3.23.0 @end menu @node News-3.23.50, News-3.23.49, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.50 @node News-3.23.51, News-3.23.50, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.51 @itemize @bullet Fixed the result from @code{IF()} is case in-sensitive if the 2 and third arguments are case sensitive. @end itemize @node News-3.23.50, News-3.23.49, News-3.23.51, News-3.23.x @appendixsubsec Changes in release 3.23.50 @itemize @bullet @item Fixed problem with @code{crash-me} and gcc 3.0.4. dbug/Makefile.am +4 −3 Original line number Diff line number Diff line Loading @@ -20,8 +20,9 @@ LDADD = libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libdbug.a noinst_HEADERS = dbug_long.h libdbug_a_SOURCES = dbug.c sanity.c EXTRA_DIST = example1.c example2.c example3.c user.r monty.doc readme.prof \ main.c factorial.c EXTRA_DIST = example1.c example2.c example3.c \ user.r monty.doc readme.prof \ main.c factorial.c dbug_analyze.c OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ __math.h time.h __time.h unistd.h __unistd.h types.h \ Loading @@ -32,7 +33,7 @@ OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ sleep.h specific.h version.h pwd.h timers.h uio.h \ cdefs.h machdep.h signal.h __signal.h util.h # Must be linked with libs thta are not compiled yet # Must be linked with libs that are not compiled yet extra_progs: factorial dbug_analyze factorial: main.o factorial.o Loading dbug/monty.doc +8 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,11 @@ giving a double ':'. (As in "O,c::\tmp\log") DBUG_DUMP("keyword",memory-position,length) writes a hexdump of the given memory-area to the outputfile. All changes that I or other people at MySQL AB have done to all files in the dbug library (Mainly in dbug.c, dbug_analyze.c, dbug_long.h, dbug.h) are put in public domain, as the rest of the dbug.c library) To my knowledge, all code in dbug library are in public domain. Michael Widenius mysql-test/t/func_test.test +0 −11 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ select 'abc' like '%c','abcabc' like '%c', "ab" like "", "ab" like "a", "ab" li select "Det här är svenska" regexp "h[[:alpha:]]+r", "aba" regexp "^(a|b)*$"; select "aba" regexp concat("^","a"); select !0,NOT 0=1,!(0=0),1 AND 1,1 && 0,0 OR 1,1 || NULL, 1=1 or 1=1 and 1=0; select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0 ; select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between "max" and "my" and 3=3; select 'b' between 'a' and 'c', 'B' between 'a' and 'c'; select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0); Loading @@ -24,13 +23,3 @@ select -1.49 or -1.49,0.6 or 0.6; select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1; select 1 and 0 or 2, 2 or 1 and 0; # # Problem with IF() # drop table if exists t1; create table t1 (num double(12,2)); insert into t1 values (144.54); select sum(if(num is null,0.00,num)) from t1; drop table t1; sql/item_cmpfunc.cc +4 −0 Original line number Diff line number Diff line Loading @@ -490,8 +490,12 @@ Item_func_if::fix_length_and_dec() 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(); binary=1; if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT) { cached_result_type = STRING_RESULT; binary=args[1]->binary | args[2]->binary; } else if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT) cached_result_type = REAL_RESULT; else Loading Loading
Docs/manual.texi +12 −2 Original line number Diff line number Diff line Loading @@ -29916,6 +29916,9 @@ stored into a temporary table) is calculated in MySQL Version @item expr2 or expr3 returns an integer @tab integer @end multitable If expr2 and expr3 are strings, then the result is case sensitive if both strings are case sensitive. (Starting from 3.23.51) @findex CASE @item CASE value WHEN [compare-value] THEN result [WHEN [compare-value] THEN result ...] [ELSE result] END @item CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END Loading Loading @@ -46854,6 +46857,7 @@ users use this code as the rest of the code and because of this we are not yet 100% confident in this code. @menu * News-3.23.51:: * News-3.23.50:: Changes in release 3.23.50 * News-3.23.49:: Changes in release 3.23.49 * News-3.23.48:: Changes in release 3.23.48 Loading Loading @@ -46908,9 +46912,15 @@ not yet 100% confident in this code. * News-3.23.0:: Changes in release 3.23.0 @end menu @node News-3.23.50, News-3.23.49, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.50 @node News-3.23.51, News-3.23.50, News-3.23.x, News-3.23.x @appendixsubsec Changes in release 3.23.51 @itemize @bullet Fixed the result from @code{IF()} is case in-sensitive if the 2 and third arguments are case sensitive. @end itemize @node News-3.23.50, News-3.23.49, News-3.23.51, News-3.23.x @appendixsubsec Changes in release 3.23.50 @itemize @bullet @item Fixed problem with @code{crash-me} and gcc 3.0.4.
dbug/Makefile.am +4 −3 Original line number Diff line number Diff line Loading @@ -20,8 +20,9 @@ LDADD = libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libdbug.a noinst_HEADERS = dbug_long.h libdbug_a_SOURCES = dbug.c sanity.c EXTRA_DIST = example1.c example2.c example3.c user.r monty.doc readme.prof \ main.c factorial.c EXTRA_DIST = example1.c example2.c example3.c \ user.r monty.doc readme.prof \ main.c factorial.c dbug_analyze.c OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ __math.h time.h __time.h unistd.h __unistd.h types.h \ Loading @@ -32,7 +33,7 @@ OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ sleep.h specific.h version.h pwd.h timers.h uio.h \ cdefs.h machdep.h signal.h __signal.h util.h # Must be linked with libs thta are not compiled yet # Must be linked with libs that are not compiled yet extra_progs: factorial dbug_analyze factorial: main.o factorial.o Loading
dbug/monty.doc +8 −0 Original line number Diff line number Diff line Loading @@ -10,3 +10,11 @@ giving a double ':'. (As in "O,c::\tmp\log") DBUG_DUMP("keyword",memory-position,length) writes a hexdump of the given memory-area to the outputfile. All changes that I or other people at MySQL AB have done to all files in the dbug library (Mainly in dbug.c, dbug_analyze.c, dbug_long.h, dbug.h) are put in public domain, as the rest of the dbug.c library) To my knowledge, all code in dbug library are in public domain. Michael Widenius
mysql-test/t/func_test.test +0 −11 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ select 'abc' like '%c','abcabc' like '%c', "ab" like "", "ab" like "a", "ab" li select "Det här är svenska" regexp "h[[:alpha:]]+r", "aba" regexp "^(a|b)*$"; select "aba" regexp concat("^","a"); select !0,NOT 0=1,!(0=0),1 AND 1,1 && 0,0 OR 1,1 || NULL, 1=1 or 1=1 and 1=0; select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0 ; select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between "max" and "my" and 3=3; select 'b' between 'a' and 'c', 'B' between 'a' and 'c'; select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0); Loading @@ -24,13 +23,3 @@ select -1.49 or -1.49,0.6 or 0.6; select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1; select 1 and 0 or 2, 2 or 1 and 0; # # Problem with IF() # drop table if exists t1; create table t1 (num double(12,2)); insert into t1 values (144.54); select sum(if(num is null,0.00,num)) from t1; drop table t1;
sql/item_cmpfunc.cc +4 −0 Original line number Diff line number Diff line Loading @@ -490,8 +490,12 @@ Item_func_if::fix_length_and_dec() 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(); binary=1; if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT) { cached_result_type = STRING_RESULT; binary=args[1]->binary | args[2]->binary; } else if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT) cached_result_type = REAL_RESULT; else Loading