1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-21841 CONV() function doesn't truncate its output to 21 when uses default charset.

This commit is contained in:
Roman Nozdrin
2020-02-28 15:44:56 +00:00
parent e837a358b6
commit 1ad8693a6f
3 changed files with 27 additions and 1 deletions

View File

@ -5159,6 +5159,21 @@ DROP TABLE t1, t2;
# Start of 10.4 tests
#
#
# MDEV-21841 CONV() function truncates the result type to 21 symbol.
#
CREATE TABLE t1(i BIGINT);
INSERT INTO t1 VALUES (-1);
CREATE TABLE t2 AS SELECT conv(i,16,2) from t1;
SELECT * FROM t2;
conv(i,16,2)
1111111111111111111111111111111111111111111111111111111111111111
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`conv(i,16,2)` varchar(64) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
#
# MDEV-18205 Assertion `str_length < len' failed in Binary_string::realloc_raw
#
SELECT GROUP_CONCAT( UpdateXML( '<a>new year</a>', '/a', '2019-01-01 00:00:00' ), ENCODE('text','pass') ) AS f;