PL/SQL parser (MDEV-10142)

[MDEV-15107] Add virtual Field::sp_prepare_and_store_item(), make sp_rcontext symmetric for scalar and ROW Created: 2018-01-29  Updated: 2018-08-31  Resolved: 2018-01-29

Status: Closed
Project: MariaDB Server
Component/s: Stored routines
Affects Version/s: None
Fix Version/s: 10.3.5

Type: Technical task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-15112 Inconsistent evaluation of spvariable... Closed
Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

After MDEV-14212, the Virtual_tmp_table instance that stores a ROW variable elements is accessible from the underlying Field_row (rather than Item_field_row).

Under terms of this task we'll do some further changes by moving the code from sp_instr_xxx, sp_rcontext, Item_xxx to Virtual_tmp_table and Field_xxx:

  • Move the data type specific code (scalar vs ROW) which stores a value to an SP variable into a new virtual method Field_xxx::sp_prepare_and_store_item().
  • Make the the code in sp_rcontext::set_variable() and sp_eval_expr() symmetric for scalar and ROW values.
  • Make the code in in sp_rcontext::set_variable_row_field(), sp_rcontext::set_variable_row_field(), sp_rcontext::set_variable_row() symmetric for ROW elements (i.e. scalar and ROW elements inside a ROW).

Rationale:

Prepare the code to implement these tasks soon easier:

  • MDEV-12252 ROW data type for stored function return values
  • MDEV-12307 ROW data type for built-in function return values
  • MDEV-6121 Data type: Array
  • MDEV-10593 sql_mode=ORACLE: TYPE .. AS OBJECT: basic functionality
  • ROW with ROW fields (no MDEV yet)

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