Details
-
Technical task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
We'll support IN, OUT and IN OUT modes for bind arguments when running in sql_mode=ORACLE, according to the following grammar:
execute_immediate_statement ::=
|
EXECUTE_IMMEDIATE dynamic_string
|
[ INTO { define_variable [, define_variable ...] | record_name } ] |
[ USING [ IN | OUT | IN OUT ] bind_argument |
[, [ IN | OUT | IN OUT ] bind_argument] ... ] |
[ {RETURNING | RETURN } INTO bind_argument [, bind_argument]... ]; |
Example:
DECLARE
|
plsql_block VARCHAR2(500);
|
new_deptid NUMBER(4);
|
new_dname VARCHAR2(30) := 'Advertising'; |
new_mgrid NUMBER(6) := 200;
|
new_locid NUMBER(4) := 1700;
|
BEGIN
|
-- Dynamic PL/SQL block invokes subprogram: |
plsql_block := 'BEGIN create_dept(:a, :b, :c, :d); END;'; |
|
/* Specify bind arguments in USING clause. |
Specify mode for first parameter.
|
Modes of other parameters are correct by default. */
|
EXECUTE IMMEDIATE plsql_block |
USING IN OUT new_deptid, new_dname, new_mgrid, new_locid; |
END; |
/
|
Attachments
Issue Links
- relates to
-
MDEV-10585 EXECUTE IMMEDIATE statement
-
- Closed
-
-
MDEV-10709 Expressions as parameters to Dynamic SQL
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link | This issue blocks MDEV-10764 [ MDEV-10764 ] |
Description |
We'll support {{IN}}, {{OUT}} and {{IN OUT}} modes for bind arguments when running in {{sql_mode=ORACLE}}, according to the following grammar:
{code:sql} execute_immediate_statement ::= EXECUTE_IMMEDIATE dynamic_string [ INTO { define_variable [, define_variable ...] | record_name } ] [ USING [ IN | OUT | IN OUT ] bind_argument [, [ IN | OUT | IN OUT ] bind_argument] ... ] [ {RETURNING | RETURN } INTO bind_argument [, bind_argument]... ]; {code} |
We'll support {{IN}}, {{OUT}} and {{IN OUT}} modes for bind arguments when running in {{sql_mode=ORACLE}}, according to the following grammar:
{code:sql} execute_immediate_statement ::= EXECUTE_IMMEDIATE dynamic_string [ INTO { define_variable [, define_variable ...] | record_name } ] [ USING [ IN | OUT | IN OUT ] bind_argument [, [ IN | OUT | IN OUT ] bind_argument] ... ] [ {RETURNING | RETURN } INTO bind_argument [, bind_argument]... ]; {code} Example: {code:sql} DECLARE plsql_block VARCHAR2(500); new_deptid NUMBER(4); new_dname VARCHAR2(30) := 'Advertising'; new_mgrid NUMBER(6) := 200; new_locid NUMBER(4) := 1700; BEGIN -- Dynamic PL/SQL block invokes subprogram: plsql_block := 'BEGIN create_dept(:a, :b, :c, :d); END;'; /* Specify bind arguments in USING clause. Specify mode for first parameter. Modes of other parameters are correct by default. */ EXECUTE IMMEDIATE plsql_block USING IN OUT new_deptid, new_dname, new_mgrid, new_locid; END; / {code} |
Link |
This issue relates to |
Link | This issue blocks MDEV-10764 [ MDEV-10764 ] |
Parent | MDEV-10764 [ 57940 ] | |
Issue Type | Task [ 3 ] | Technical task [ 7 ] |
Link |
This issue relates to |
Summary | IN, OUT, IN OUT modes for dynamic SQL bind arguments | sql_mode=ORACLE: IN, OUT, IN OUT modes for dynamic SQL bind arguments |
Fix Version/s | 10.3 [ 22126 ] |
Labels | Compatibility |
Assignee | Alexander Barkov [ bar ] |
Workflow | MariaDB v3 [ 79176 ] | MariaDB v4 [ 140183 ] |