[MDEV-13581] ROW TYPE OF t1 and t1%ROWTYPE for routine parameters Created: 2017-08-18  Updated: 2018-08-31  Resolved: 2017-08-18

Status: Closed
Project: MariaDB Server
Component/s: Parser, Stored routines
Fix Version/s: 10.3.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: Compatibility

Issue Links:
Relates
relates to MDEV-12133 sql_mode=ORACLE: table%ROWTYPE in var... Closed
relates to MDEV-12461 TYPE OF and ROW TYPE OF anchored data... Closed

 Description   

Under terms of this task we'll implement anchored ROW data types for routine parameters, using the same syntax that was previously implemented for routine local variables:

SET sql_mode=DEFAULT;
CREATE TABLE t1 (a INT, b TEXT);
DELIMITER $$
CREATE PROCEDURE p1 (a ROW TYPE OF t1)
BEGIN
  SET a.a=10;
  SET a.b='text';
END;
$$
DELIMITER ;

SET sql_mode=ORACLE;
CREATE TABLE t1 (a INT, b TEXT);
DELIMITER $$
CREATE PROCEDURE p1 (a t1%ROWTYPE) AS
BEGIN
  a.a:=10;
  a.b:='text';
END;
$$
DELIMITER ;


Generated at Thu Feb 08 08:06:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.