mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-29108 RANDOM_BYTES - assertion in Create_tmp_table::finalize
Setting max_length to a negative value in Item_func_random_bytes::fix_length_and_dec underflowed resulting in debug optimizer assertion. Also set the maximium to 1024 rather than MAX_BLOB_WIDTH because we aren't going to return more than that.
This commit is contained in:
committed by
Sergei Golubchik
parent
a95268c5b3
commit
7f06f68108
@ -5319,5 +5319,13 @@ ERROR 22003: length value is out of range in 'random_bytes('res')'
|
||||
SELECT random_bytes('test');
|
||||
ERROR 22003: length value is out of range in 'random_bytes('test')'
|
||||
#
|
||||
# MDEV-29108: RANDOM_BYTES - assertion in Create_tmp_table::finalize
|
||||
#
|
||||
CREATE TABLE t (a INT);
|
||||
INSERT INTO t VALUES (1),(2);
|
||||
SELECT RANDOM_BYTES(-10) f1, IFNULL(a,1) f2 FROM t GROUP BY f1, f2;
|
||||
ERROR 22003: length value is out of range in 'random_bytes(-10)'
|
||||
DROP TABLE t;
|
||||
#
|
||||
# End of 10.10 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user