You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sqlc generate sometimes silently fails and sometimes segfaults. I managed to isolate the issue to this nested query
-- name: GetAnsweredTasksWithQuestionText :manySELECT*FROM (
SELECT room_tasks.*, cards.questionFROM room_tasks
JOIN cards ONroom_tasks.card_id=cards.idWHERE room_id = $1AND answer_submitted_at IS NOT NULLANDroom_tasks.deleted_at IS NULLAND cards IS NULLORDER BY order_in_attempt DESC-- TODO: LIMIT 1000
) ORDER BY order_in_attempt ASC;
if you add the LIMIT 1000, it seems to segfault always
There is a mistake in the cards IS NULL part of the nested query, nevertheless, it should not segfault.
-- name: GetAnsweredTasksWithQuestionText :many
SELECT * FROM (
SELECT room_tasks.*, cards.question FROM room_tasks
JOIN cards ON room_tasks.card_id = cards.id
WHERE room_id = $1 AND answer_submitted_at IS NOT NULL AND room_tasks.deleted_at IS NULL AND cards IS NULL ORDER BY order_in_attempt DESC
) ORDER BY order_in_attempt ASC;
Configuration
No response
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered:
Version
1.27.0
What happened?
sqlc generate
sometimes silently fails and sometimes segfaults. I managed to isolate the issue to this nested queryThere is a mistake in the
cards IS NULL
part of the nested query, nevertheless, it should not segfault.Relevant log output
Database schema
SQL queries
-- name: GetAnsweredTasksWithQuestionText :many
SELECT * FROM (
SELECT room_tasks.*, cards.question FROM room_tasks
JOIN cards ON room_tasks.card_id = cards.id
WHERE room_id = $1 AND answer_submitted_at IS NOT NULL AND room_tasks.deleted_at IS NULL AND cards IS NULL ORDER BY order_in_attempt DESC
) ORDER BY order_in_attempt ASC;
Configuration
No response
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: