summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_math.test
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2010-11-17 16:39:35 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2010-11-17 16:39:35 +0100
commit36ab257491c3021680c4d845c4690e3e294c2436 (patch)
treedecc5f690acbbb671f63abf25ccdf2e44c71a82b /mysql-test/t/func_math.test
parentcd9bee8da292b0b493ec4cdb61d818caa280a094 (diff)
downloadmariadb-git-36ab257491c3021680c4d845c4690e3e294c2436.tar.gz
Bug #58137 char(0) column cause: my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed
mysql-test/r/func_math.result: Add test for Bug #58137 mysql-test/t/func_math.test: Add test for Bug #58137 sql/field.cc: Skip calling my_gcvt() if we are trying to insert a double into a char(0) column.
Diffstat (limited to 'mysql-test/t/func_math.test')
-rw-r--r--mysql-test/t/func_math.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index efdf7201a40..5d5dea74e28 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -464,3 +464,11 @@ SELECT -9223372036854775808 MOD -1;
--echo #
SELECT floor(log10(format(concat_ws(5445796E25, 5306463, 30837), -358821)))
as foo;
+
+--echo #
+--echo # Bug #58137 char(0) column cause:
+--echo # my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed
+--echo #
+CREATE TABLE t1(a char(0));
+INSERT INTO t1 (SELECT -pi());
+DROP TABLE t1;