mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #59241 invalid memory read in do_div_mod with doubly assigned variables
Fix: copy my_decimal by value, to avoid dangling pointers.
This commit is contained in:
@ -641,3 +641,12 @@ INSERT INTO t1 (SELECT -pi());
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #59241 invalid memory read
|
||||
# in do_div_mod with doubly assigned variables
|
||||
#
|
||||
SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')));
|
||||
((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1366 Incorrect decimal value: '' for column '' at row -1
|
||||
|
Reference in New Issue
Block a user