summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_str.result
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2010-12-14 19:08:25 +0300
committerSergey Glukhov <sergey.glukhov@oracle.com>2010-12-14 19:08:25 +0300
commit76627d5fc33749cb329a6ced6ce8ba16a3bdd558 (patch)
treeeb9266e1f7523ad256a18bfea6203ab7e7fe2ed2 /mysql-test/r/func_str.result
parenta0a63b3160472c4214ec775d84811cea1e761d85 (diff)
downloadmariadb-git-76627d5fc33749cb329a6ced6ce8ba16a3bdd558.tar.gz
Bug#57818 string conversion function died
Bug#57913 large negative number to string conversion functions crash String object which is used as result container of the item has uninitialized 'str_charset' field. This object might be used later to preform some internal operations and str_charset field is involved in these operations. It leads to crash. The fix is to intialize str_charset in my_decimal2string() func. mysql-test/r/func_str.result: test case mysql-test/t/func_str.test: test case sql/my_decimal.cc: intialize str_charset field for result string in my_decimal2string() func.
Diffstat (limited to 'mysql-test/r/func_str.result')
-rw-r--r--mysql-test/r/func_str.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 4268268fabb..0321b2d85ad 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -2600,4 +2600,16 @@ ORDER BY QUOTE(t1.a);
1
1
DROP TABLE t1;
+#
+# Bug#57913 large negative number to string conversion functions crash
+# Bug#57810 case/when/then : Assertion failed: length || !scale
+#
+SELECT '1' IN ('1', SUBSTRING(-9223372036854775809, 1));
+'1' IN ('1', SUBSTRING(-9223372036854775809, 1))
+1
+SELECT CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3));
+CONVERT(('' IN (REVERSE(CAST(('') AS DECIMAL)), '')), CHAR(3))
+1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: ''
End of 5.1 tests