@item The default return type of @code{IF} will now depend on both arguments
@item The default return type of @code{IF} will now depend on both arguments
and not only the first argument.
and not only the first argument.
@item @code{AUTO_INCREMENT} will not work with negative numbers.
@item @code{AUTO_INCREMENT} will not work with negative numbers.
@item @code{INNER}, @code{DELAYED}, @code{RIGHT} and @code{WHEN}
@item @code{INNER}, @code{DELAYED}, @code{RIGHT}, @code{CASE}, @code{THEN}, @code{WHEN}, @code{ELSE}, @code{END} and @code{WHEN} are now reserved words.
are now reserved words.
@item @code{FLOAT(X)} is now a true floating-point type and not a value with
@item @code{FLOAT(X)} is now a true floating-point type and not a value with
a fixed number of decimals.
a fixed number of decimals.
@item When declaring @code{DECIMAL(length,dec)} the length argument no
@item When declaring @code{DECIMAL(length,dec)} the length argument no
...
@@ -9816,10 +9815,11 @@ almost always sorted. In Version 3.23, you must use @code{GROUP BY} or
...
@@ -9816,10 +9815,11 @@ almost always sorted. In Version 3.23, you must use @code{GROUP BY} or
@item
@item
@code{SUM()} now returns @code{NULL}, instead of 0, if there is no matching
@code{SUM()} now returns @code{NULL}, instead of 0, if there is no matching
rows. This is according to ANSI SQL.
rows. This is according to ANSI SQL.
@item New restricted words: @code{CASE, THEN, WHEN, ELSE, END, and RIGHT}.
@item An @code{AND} or @code{OR} with @code{NULL} values will now return
@item An @code{AND} or @code{OR} with @code{NULL} values will now return
@code{NULL} instead of 0. This mostly affects queries that use @code{NOT}
@code{NULL} instead of 0. This mostly affects queries that use @code{NOT}
on an @code{AND/OR} expression as @code{NOT NULL} = @code{NULL}.
on an @code{AND/OR} expression as @code{NOT NULL} = @code{NULL}.
@code{LPAD()} and @code{RPAD()} will shorten the result string if it's longer
than the length argument.
@end itemize
@end itemize
@cindex compatibility, between MySQL versions
@cindex compatibility, between MySQL versions
...
@@ -14389,11 +14389,13 @@ The values retrieved from the @code{CHAR(4)} and @code{VARCHAR(4)} columns
...
@@ -14389,11 +14389,13 @@ The values retrieved from the @code{CHAR(4)} and @code{VARCHAR(4)} columns
will be the same in each case, because trailing spaces are removed from
will be the same in each case, because trailing spaces are removed from
@code{CHAR} columns upon retrieval.
@code{CHAR} columns upon retrieval.
Values in @code{CHAR} and @code{VARCHAR} columns are sorted and compared in
Values in @code{CHAR} and @code{VARCHAR} columns are sorted and compared
case-insensitive fashion, unless the @code{BINARY} attribute was specified
in case-insensitive fashion, unless the @code{BINARY} attribute was
when the table was created. The @code{BINARY} attribute means that column
specified when the table was created. The @code{BINARY} attribute means
values are sorted and compared in case-sensitive fashion according to the
that column values are sorted and compared in case-sensitive fashion
ASCII order of the machine where the @strong{MySQL} server is running.
according to the ASCII order of the machine where the @strong{MySQL}
server is running. @code{BINARY} doesn't affect how the column is stored
or retrieved.
The @code{BINARY} attribute is sticky. This means that if a column marked
The @code{BINARY} attribute is sticky. This means that if a column marked
@code{BINARY} is used in an expression, the whole expression is compared as a
@code{BINARY} is used in an expression, the whole expression is compared as a
...
@@ -14831,6 +14833,11 @@ between function calls and references to tables or columns that happen to
...
@@ -14831,6 +14833,11 @@ between function calls and references to tables or columns that happen to
have the same name as a function. Spaces around arguments are permitted,
have the same name as a function. Spaces around arguments are permitted,
though.
though.
You can force @strong{MySQL} to accept spaces after the function name by
starting @code{mysqld} with @code{--ansi} or using the
@code{CLIENT_IGNORE_SPACE} to @code{mysql_connect()}, but in this case all
function names will become reserved words. @xref{ANSI mode}.
@need 2000
@need 2000
For the sake of brevity, examples display the output from the @code{mysql}
For the sake of brevity, examples display the output from the @code{mysql}
program in abbreviated form. So this:
program in abbreviated form. So this:
...
@@ -16160,8 +16167,9 @@ This function is multi-byte safe.
...
@@ -16160,8 +16167,9 @@ This function is multi-byte safe.
@findex LPAD()
@findex LPAD()
@item LPAD(str,len,padstr)
@item LPAD(str,len,padstr)
Returns the string @code{str}, left-padded with the string
Returns the string @code{str}, left-padded with the string @code{padstr}
@code{padstr} until @code{str} is @code{len} characters long:
until @code{str} is @code{len} characters long. If @code{str} is longer
than @code{len'} then it will be shortened to @code{len} characters.