Skip to content

Commit ad8266a

Browse files
committed
MDEV-20732 MDB now correctly estimates a length of the FORMAT() result for
doubles in scientific notation with a big integer part.
1 parent 6535827 commit ad8266a

File tree

9 files changed

+2041
-8
lines changed

9 files changed

+2041
-8
lines changed

mysql-test/main/ctype_many.result

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,7 @@ DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
16951695
AS BINARY(0)) USING utf8);
16961696
Warnings:
16971697
Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
1698+
Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
16981699
Warning 1292 Truncated incorrect DOUBLE value: ''
16991700
Warning 1292 Truncated incorrect BINARY(0) value: '1.'
17001701
#

mysql-test/main/ctype_many.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@ DROP TABLE t1;
225225
--echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
226226
--echo #
227227

228+
--disable_ps_protocol
228229
SET NAMES latin1;
229230
DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
230231
AS BINARY(0)) USING utf8);
232+
--enable_ps_protocol
231233
--echo #
232234
--echo # End of 5.1 tests
233235
--echo #

mysql-test/main/ctype_utf32.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
15881588
SHOW CREATE TABLE t1;
15891589
Table Create Table
15901590
t1 CREATE TABLE `t1` (
1591-
`format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 DEFAULT NULL
1591+
`format(123,2,'no_NO')` varchar(17) CHARACTER SET utf32 DEFAULT NULL
15921592
) ENGINE=MyISAM DEFAULT CHARSET=latin1
15931593
SELECT * FROM t1;
15941594
format(123,2,'no_NO')

0 commit comments

Comments
 (0)