Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.17, 10.3.9, 10.2(EOL), 10.3(EOL)
-
None
Description
The following query works fine:
PREPARE stmt FROM |
'WITH t1 AS (SELECT 1)
|
SELECT * FROM t1
|
UNION ALL
|
SELECT * FROM t1' |
When extracting the "1" into a parameter the query fails with error 1064:
PREPARE stmt FROM |
'WITH t1 AS (SELECT ?)
|
SELECT * FROM t1
|
UNION ALL
|
SELECT * FROM t1' |
Tested on OSX 10.13.6. MySQL 8 seems to handle this without trouble.