- Notifications
You must be signed in to change notification settings - Fork109
Closed
Description
Bug report
SELECT1FROM assessmentsAS aWHEREa.id= $assessment_idFOR NO KEYUPDATE;
apps/prairielearn/src/lib/assessment.sql:544:12 syntax ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✖ Invalid statement: syntax error at or near ";" 542 │ WHERE 543 │ a.id = $assessment_id > 544 │ FOR NO KEY UPDATE; │ ^^^^^^^ 545 │ 546 │ -- BLOCK select_assessment_needs_statistics_updateWITH RECURSIVE template_questionsAS (-- non-recursive term that finds the ID of the template question (if any) for question_idSELECTtq.id,tq.qid,tq.course_id,tq.template_directoryFROM questionsAS qJOIN questionsAS tqON (tq.qid=q.template_directoryANDtq.course_id=q.course_id )WHEREq.id= $question_idANDtq.deleted_at ISNULL-- required UNION for a recursive WITH statementUNION-- recursive term that references template_questions againSELECTtq.id,tq.qid,tq.course_id,tq.template_directoryFROM template_questionsAS qJOIN questionsAS tqON (tq.qid=q.template_directoryANDtq.course_id=q.course_id )WHEREtq.deleted_at ISNULL )SELECT idFROM template_questionsLIMIT100;
apps/prairielearn/src/lib/chunks.sql:73:6 syntax ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✖ Expected IDENT 72 │ -- BLOCK select_template_question_ids > 73 │ WITH RECURSIVE │ ^^^^^^^^^ 74 │ template_questions AS ( 75 │ -- non-recursive term that finds the ID of the template question (if any) for question_id- I confirm I have searched theDocs, GitHubDiscussions, andDiscord.
To Reproduce
Reproduction is identical to#482
System information
- v0.12.0 (latest)