Whole file
andialbrecht/sqlparse
The author described this change as “Fix parsing of INTO keyword in WHERE clauses (fixes #324).”. It counts as a record because the check below fails on the code as it stood at 0ea7cf49b and passes on 59033cc0e, with nothing else changed between the two runs.
Projectandialbrecht/sqlparse
Fix saved2017-03-02
Sharing licenceBSD-3-Clause · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
Fix parsing of INTO keyword in WHERE clauses (fixes #324).
The change
| 527 | 527 | """A WHERE clause.""" | |
| 528 | 528 | M_OPEN = T.Keyword, 'WHERE' | |
| 529 | 529 | M_CLOSE = T.Keyword, ('ORDER', 'GROUP', 'LIMIT', 'UNION', 'EXCEPT', | |
| 530 | - | 'HAVING', 'RETURNING') | |
| 530 | + | 'HAVING', 'RETURNING', 'INTO') | |
| 531 | 531 | ||
| 532 | 532 | ||
| 533 | 533 | class Case(TokenList): |
The check that tells the two apart
fail→pass·tests/test_grouping.py::test_into_kw_ends_where_clause
Check file tests/test_grouping.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 it0ea7cf49bd329bba28833a7e33c95b131c71a029
Broken version dated2017-02-13
Modulesqlparse.sql
Units changedWhere
Fingerprint7ddead42abcc33b8
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.