summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_math.test
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-03-28 12:35:50 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-03-28 12:35:50 +0400
commita88faf2a4af5f60722647a8e01de6aac20305bb7 (patch)
tree08ac663e3fedcc6a9c0624a3090db1138ce8bc2c /mysql-test/t/func_math.test
parentff23f5360ee328bd6adb14436e68e080cfe1d110 (diff)
downloadmariadb-git-a88faf2a4af5f60722647a8e01de6aac20305bb7.tar.gz
Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR
Assert fails due to overflow which happens in Item_func_int_val::fix_num_length_and_dec() as geometry functions have max_length value equal to max_field_size(4294967295U). The fix is to skip max_length calculation for some boundary cases. mysql-test/r/func_math.result: test case mysql-test/t/func_math.test: test case sql/item_func.cc: skip max_length calculation if argument max_length is near max_field_size.
Diffstat (limited to 'mysql-test/t/func_math.test')
-rw-r--r--mysql-test/t/func_math.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index c8ea11c7490..64b6a3a4ea6 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -324,4 +324,13 @@ CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--echo #
+--echo # Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR
+--echo #
+
+CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL);
+DROP TABLE t1;
+CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL);
+DROP TABLE t1;
+
--echo End of 5.1 tests