PL/SQL parser (MDEV-10142)

[MDEV-10866] Extend PREPARE and EXECUTE IMMEDIATE to understand expressions Created: 2016-09-22  Updated: 2018-08-31  Resolved: 2016-10-04

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: 10.3
Fix Version/s: 10.2.3, 10.3.0

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

Issue Links:
Relates
relates to MDEV-12055 binlog.binlog_stm_ctype_ucs test failing Closed
relates to MDEV-12798 Item_param does not preserve exact fi... Closed
relates to MDEV-10585 EXECUTE IMMEDIATE statement Closed
Sprint: 10.2.2-3, 10.2.2-1, 10.2.2-2, 10.2.2-4, 10.1.18

 Description   

Currently, PREPARE understands string literals or user variables:

PREPARE stmt1 FROM 'SELECT 1';
SET @s='SELECT 1';
PREPARE stmt2 FROM @s;

We'll extend PREPARE and EXECUTE IMMEDIATE to understand (almost) any kind of expressions:

PREPARE stmt FROM CONCAT('SELECT * FROM ', table_name);

Using stored functions and subselects as a prepare source is out of scope of this task.



 Comments   
Comment by Alexander Barkov [ 2016-10-04 ]

Reviewed by Monty. Small suggestions were given.

Generated at Thu Feb 08 07:45:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.