Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.1(EOL), 11.2, 11.0.4, 11.2.3, 10.4(EOL), 11.0(EOL), 11.3(EOL)
-
None
Description
Executing a prepared statement with only placeholders in a Table Value Constructor expression silently returns an empty string instead of the actual value.
EXECUTE IMMEDIATE 'SELECT * FROM (VALUES (?)) test' USING 'a'; |
Expected output:
? |
---|
a |
Got output:
? |
---|
 |
It does work if any of the values in the TVC is not a placeholder:
EXECUTE IMMEDIATE 'SELECT * FROM (VALUES (?, "b")) test' USING 'a'; |
Got output:
? |
---|
a |
b |
These types of TVC expressions would commonly be used in combination with a CTE to get named columns.
Does work as expected on 11.0.3.
Attachments
Issue Links
- is caused by
-
MDEV-32225 Test case from opt_tvc.test fails with statement memory protection
- Closed