mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#17226: Variable set in cursor on first iteration is assigned
second iterations value During assignment to the BLOB variable in routine body the value wasn't copied. mysql-test/r/sp-vars.result: Add result for bug#17226. mysql-test/t/sp-vars.test: Add test case for bug#17226. sql/field_conv.cc: Honor copy_blobs flag.
This commit is contained in:
@ -1075,3 +1075,18 @@ SELECT f1();
|
||||
f1()
|
||||
abc
|
||||
DROP FUNCTION f1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v_char VARCHAR(255);
|
||||
DECLARE v_text TEXT DEFAULT '';
|
||||
SET v_char = 'abc';
|
||||
SET v_text = v_char;
|
||||
SET v_char = 'def';
|
||||
SET v_text = concat(v_text, '|', v_char);
|
||||
SELECT v_text;
|
||||
END|
|
||||
CALL p1();
|
||||
v_text
|
||||
abc|def
|
||||
DROP PROCEDURE p1;
|
||||
|
Reference in New Issue
Block a user