1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-23149 Server crashes in my_convert / ErrConvString::ptr / Item_char_typecast::check_truncation_with_warn

10.10 part
This commit is contained in:
Sergei Golubchik
2022-08-09 14:21:38 +02:00
committed by Oleksandr Byelkin
parent 9d2b28d7cc
commit b74dbcb157
3 changed files with 19 additions and 9 deletions

View File

@@ -3,10 +3,6 @@
# Testing string functions
--source include/have_sequence.inc
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
set @save_max_allowed_packet=@@global.max_allowed_packet;
set global max_allowed_packet=1048576;
connect (conn1,localhost,root,,);
@@ -2261,7 +2257,7 @@ SELECT random_bytes('res');
SELECT random_bytes('test');
--echo #
--echo # MDEV-29108: RANDOM_BYTES - assertion in Create_tmp_table::finalize
--echo # MDEV-29108 RANDOM_BYTES - assertion in Create_tmp_table::finalize
--echo #
CREATE TABLE t (a INT);
@@ -2272,12 +2268,18 @@ SELECT RANDOM_BYTES(-10) f1, IFNULL(a,1) f2 FROM t GROUP BY f1, f2;
DROP TABLE t;
--echo #
--echo # MDEV-29154: Excessive warnings upon a call to RANDOM_BYTES
--echo # MDEV-29154 Excessive warnings upon a call to RANDOM_BYTES
--echo #
select length(random_bytes(cast('x' as unsigned)+1));
select repeat('.', cast('x' as unsigned)+1);
--echo #
--echo # MDEV-23149 Server crashes in my_convert / ErrConvString::ptr / Item_char_typecast::check_truncation_with_warn
--echo #
--replace_regex /'.*'/'...random bytes...'/
select "a" in ("abc", (convert(random_bytes(8) ,binary(2))));
--echo #
--echo # End of 10.10 tests
--echo #