1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-13581 ROW TYPE OF t1 and t1%ROWTYPE for routine parameters

This commit is contained in:
Alexander Barkov
2017-08-18 18:29:33 +04:00
parent a70809c0fc
commit 4305c3ca57
10 changed files with 615 additions and 50 deletions

View File

@ -970,3 +970,31 @@ Pos Instruction
DROP PROCEDURE testp_bug11763507;
DROP FUNCTION testf_bug11763507;
#END OF BUG#11763507 test.
#
# MDEV-13581 ROW TYPE OF t1 and t1%ROWTYPE for routine parameters
#
CREATE TABLE t1 (a INT, b TEXT);
CREATE PROCEDURE p1(a ROW TYPE OF t1, OUT b ROW TYPE OF t1)
BEGIN
SET a.a = 100;
SET a.b = 'aaa';
SET b.a = 200;
SET b.b = 'bbb';
SET a = b;
SET b = a;
SET a.a = b.a;
SET b.a = a.a;
END;
$$
SHOW PROCEDURE CODE p1;
Pos Instruction
0 set a.a@0["a"] 100
1 set a.b@0["b"] 'aaa'
2 set b.a@1["a"] 200
3 set b.b@1["b"] 'bbb'
4 set a@0 b@1
5 set b@1 a@0
6 set a.a@0["a"] b.a@1["a"]
7 set b.a@1["a"] a.a@0["a"]
DROP PROCEDURE p1;
DROP TABLE t1;