Ensure that multi-nested parenthesis are never unrolled after IN
[scpubgit/Q-Branch.git] / lib / SQL / Abstract / Tree.pm
index 519cae4..c6faef9 100644 (file)
@@ -659,7 +659,7 @@ sub _parenthesis_unroll {
       }
 
       # unroll nested parenthesis
-      while ( @{$child->[1]} == 1 and $child->[1][0][0] eq '-PAREN') {
+      while ( $ast->[0] ne 'IN' and @{$child->[1]} == 1 and $child->[1][0][0] eq '-PAREN') {
         $child = $child->[1][0];
         $changes++;
       }