summaryrefslogtreecommitdiff
path: root/Docs/manual.texi
diff options
context:
space:
mode:
Diffstat (limited to 'Docs/manual.texi')
-rw-r--r--Docs/manual.texi16
1 files changed, 16 insertions, 0 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 431b6911393..d8b63c71726 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -31150,6 +31150,17 @@ mysql> select TRUNCATE(1.999,1);
-> 1.9
mysql> select TRUNCATE(1.999,0);
-> 1
+mysql> select TRUNCATE(-1,999,1);
+ -> -1.9
+@end example
+
+Starting from MySQL 3.23.51 all numbers are rounded towards zero.
+
+If @code{D} is negative, then the whole part of the number is zeroed out:
+
+@example
+mysql> select truncate(122,-2);
+ -> 100
@end example
Note that as decimal numbers are normally not stored as exact numbers in
@@ -46916,6 +46927,11 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.51
@itemize @bullet
@item
+Cleaned up @code{NULL} handling for default values in @code{DESCRIBE
+table_name}.
+@item
+Fixed @code{truncate()} to round up negative values to the nearest integer.
+@item
Remove end space from @code{enum} values. (This fixed a problem with
@code{SHOW CREATE TABLE}).
@item