summaryrefslogtreecommitdiff
path: root/Docs
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-05-31 15:22:38 +0300
committerunknown <monty@hundin.mysql.fi>2002-05-31 15:22:38 +0300
commit0ceaf6d2c28f4f639a0ba5c329964e4dbe71cb7f (patch)
tree85c51f351e6086eebde739636a64e7ab09b85277 /Docs
parent2c058d84784c67bd514ad6c879333d2c9aac8161 (diff)
downloadmariadb-git-0ceaf6d2c28f4f639a0ba5c329964e4dbe71cb7f.tar.gz
Portability fixes for SCO and HPUX
Change TRUNCATE(number) to truncate towards zero for negative numbers Fix NULL handling for DESCRIBE table_name Docs/manual.texi: Update of TRUNCATE() information configure.in: Fix for HPUX extra/resolveip.c: Fix for SCO include/my_net.h: Fix for HPUX libmysql/libmysql.c: Removed warning on HPUX 10.20 mysql-test/r/func_math.result: Test of new TRUNCATE handling mysql-test/t/func_math.test: Test of new TRUNCATE handling mysys/my_gethostbyname.c: Portability fix sql/item_func.cc: Change TRUNCATE(number) to truncate towards zero for negative numbers sql/sql_show.cc: Fix NULL handling for DESCRIBE table_name
Diffstat (limited to 'Docs')
-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