Commit c99c1fd3 authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Changed IF(expr, column, NULL) to take type from column

Fixed some windows portability problems and removed some compiler warnings
 Cleaned up QUOTE() function and fixed bug in \0 and \Z handling.
parent deaec7b0
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -31071,6 +31071,10 @@ mysql> SELECT IF(STRCMP('test','test1'),'no','yes');
        -> 'no'
@end example
If @code{expr2} or @code{expr3} is explicitely @code{NULL} then the
result type of the @code{IF()} function is the type of the not
@code{NULL} column. (This behavior is new in MySQL 4.0.3).
@code{expr1} is evaluated as an integer value, which means that if you are
testing floating-point or string values, you should do so using a comparison
operation:
@@ -50226,10 +50230,13 @@ each individual 4.0.x release.
@itemize @bullet
@item
Fixed security bug in database hash
Changed behavior of @code{IF(condition,column,NULL)} so that it returns
the value of the column type.
@item
Made @code{safe_mysqld} a symlink to @code{mysqld_safe} in binary distribution.
@item
Fixed security bug when having an empty databasename in the user.db table.
Fixed security bug when having an empty databasename in the @code{user.db}
table.
@item
Fixed some problems with @code{CREATE TABLE ... SELECT function()}.
@item
+0 −1
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ EXPORTS
	mysql_read_query_result
	mysql_real_escape_string
	mysql_ssl_set
	mysql_ssl_clear
	mysql_real_connect
	mysql_master_query
	mysql_master_send_query
+0 −1
Original line number Diff line number Diff line
@@ -1097,7 +1097,6 @@ int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def,
			   const byte *record, my_off_t pos)
{
  byte *rec_buff,*old_record;
  uint alloced_rec_buff_length;
  int error;
  DBUG_ENTER("_mi_cmp_dynamic_unique");

+3 −0
Original line number Diff line number Diff line
@@ -152,6 +152,9 @@ quote('\'\"\\test')
select quote(concat('abc\'', '\\cba'));
quote(concat('abc\'', '\\cba'))
'abc\'\\cba'
select quote(1/0), quote('\0\Z');
quote(1/0)	quote('\0\Z')
NULL	'\0\Z'
select reverse("");
reverse("")

+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ select decode(encode("abcdef","monty"),"monty")="abcdef";

select quote('\'\"\\test');
select quote(concat('abc\'', '\\cba'));
select quote(1/0), quote('\0\Z');

#
# Wrong usage of functions
Loading