Open andrewmbenton opened 1 year ago
Is there any progress?
I have the same problem in my query. The problem occurs when I use union all in the subquery.
-- name: Search :one
SELECT * FROM (
(
SELECT a.ref_no FROM a WHERE a.id = ?
)
UNION ALL
(
SELECT a.ref_no FROM a WHERE a.id = ?
)
) AS s LIMIT 1;
macOS, MYSQL, Go, sqlc v1.23.0
Version
Other
What happened?
From https://github.com/kyleconroy/sqlc/issues/2416#issuecomment-1633767537, sqlc panics on the below query going back to at least version v1.14.0.
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/77d407f03779300c3bdefb4b7efda45ce2f65e5ee98c2257f0dd01c06cb52b91
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
No response