crate / crate/crash

Dollar quoted strings not handling semicolon in UPDATE statements

Open
#427 9 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
49
Forks
16
PR merge metrics
No merged PRs in 30d

Description

```sql
select $$test;test$$;
--> works

create table test(a text);

insert into test(a) values ($$test;test$$);
--> works

update test set a=$$test;test$$;
--> fails (works from the Admin UI)
```

_edit: Bug raised at sqlparse: https://github.com/andialbrecht/sqlparse/issues/763_

Contributor guide

Open the contributing guide

Research direction

Reproduce the shown SELECT, INSERT, and UPDATE statements in the Crash SQL shell, then inspect how statements are split before execution and compare the behavior with sqlparse issue 763. Done means the dollar-quoted semicolon remains part of the UPDATE value and the regression is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
cli, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.