Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Certain SQL statements (NO KEY,RECURSIVE) aren't parsed correctly #494

Closed
Labels
bugSomething isn't working
@reteps

Description

@reteps

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_update
WITH 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

To Reproduce

Reproduction is identical to#482

System information

  • v0.12.0 (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp