[MDEV-11360] Dynamic SQL: DEFAULT as a bind parameter Created: 2016-11-27  Updated: 2016-11-27  Resolved: 2016-11-27

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements
Fix Version/s: 10.2.3

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

Issue Links:
Blocks
blocks MDEV-11359 Implement IGNORE for bulk operation Closed
Relates
relates to MDEV-10709 Expressions as parameters to Dynamic SQL Closed

 Description   

In addition to expressions, we'll allow DEFAULT as a dynamic SQL parameter:

EXECUTE IMMEDIATE examples

EXECUTE IMMEDIATE 'INSERT INTO t1 VALUES(?)' USING DEFAULT;
EXECUTE IMMEDIATE 'UPDATE t1 SET a=?' USING DEFAULT;

PREPARE..EXECUTE examples

PREPARE stmt FROM 'INSERT INTO t1 VALUES(?)';
EXECUTE stmt USING DEFAULT;
PREPARE stmt FROM  'UPDATE t1 SET a=?';
EXECUTE stmt USING DEFAULT;

This is for symmetry with the STMT_INDICATOR_DEFAULT indicator in the client-server bind protocol.

MDEV-11359 will also use this MDEV to add INGORE as another possible bind parameter, equal to STMT_INDICATOR_INGORE.



 Comments   
Comment by Oleksandr Byelkin [ 2016-11-27 ]

OK to push after adding DBUG_ASSERT as we agreed.

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