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.

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

5656 self._begin_depth = max(0, self._begin_depth - 1)
5757 return -1
5858
59- if (unified in ('IF', 'FOR', 'WHILE')
59+ if (unified in ('IF', 'FOR', 'WHILE', 'CASE')
6060 and self._is_create and self._begin_depth > 0):
6161 return 1
6262

The check that tells the two apart

failpass·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