One function
StatementSplitter in andialbrecht/sqlparse
The author described this change as “Fix splitting of statements using CASE ... WHEN (fixes #580).”. It counts as a record because the check below fails on the code as it stood at 990500a14 and passes on d7b1ee37a, with nothing else changed between the two runs.
Projectandialbrecht/sqlparse
Fix saved2020-09-30
Sharing licenceBSD-3-Clause · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a docstring
Filter that split stream at individual statements
The change
| 56 | 56 | self._begin_depth = max(0, self._begin_depth - 1) | |
| 57 | 57 | return -1 | |
| 58 | 58 | ||
| 59 | - | if (unified in ('IF', 'FOR', 'WHILE') | |
| 59 | + | if (unified in ('IF', 'FOR', 'WHILE', 'CASE') | |
| 60 | 60 | and self._is_create and self._begin_depth > 0): | |
| 61 | 61 | return 1 | |
| 62 | 62 |
The check that tells the two apart
fail→pass·tests/test_split.py::test_split_casewhen_procedure
Check file tests/test_split.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it990500a149920b02b2b6e5ffe6e747dea7c6739e
Broken version dated2020-09-30
Modulesqlparse.engine.statement_splitter
Units changedStatementSplitter
Fingerprint27f745e969b706a0
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in andialbrecht/sqlparse
- 2026-07-25Fix get_real_name for names with more than two dotted parts (#332)
- 2026-07-22Fix function grouping skipped for lowercase 'as' in CREATE TABLE AS SELECT
- 2025-11-29StatementSplitter
- 2025-11-28StatementSplitter
- 2024-07-15StatementSplitter
- 2024-04-13Raise SQLParseError instead of RecursionError.