mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +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
@@ -2247,6 +2247,18 @@ SELECT random_bytes('res');
|
||||
--error 1690
|
||||
SELECT random_bytes('test');
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-29108: RANDOM_BYTES - assertion in Create_tmp_table::finalize
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t (a INT);
|
||||
INSERT INTO t VALUES (1),(2);
|
||||
--error 1690
|
||||
SELECT RANDOM_BYTES(-10) f1, IFNULL(a,1) f2 FROM t GROUP BY f1, f2;
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.10 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user