Skip to content

Commit 4b701a7

Browse files
committed
Solved sisue 57: StatementFilter doesn't process correctly on recursive statements (for example, triggers)
1 parent c6146cc commit 4b701a7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sqlparse/engine/filter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ def _change_splitlevel(self, ttype, value):
5757

5858
if unified == 'BEGIN':
5959
self._begin_depth += 1
60-
if self._in_declare: # FIXME(andi): This makes no sense.
61-
return 0
60+
if self._in_declare or self._is_create:
61+
# FIXME(andi): This makes no sense.
62+
return 1
6263
return 0
6364

6465
if unified == 'END':

0 commit comments

Comments
 (0)