Skip Menu |

This queue is for tickets about the SQL-Statement CPAN distribution.

Report information
The Basics
Id: 31105
Status: resolved
Priority: 0/
Queue: SQL-Statement

People
Owner: REHSACK [...] cpan.org
Requestors: GWOLF [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.15
Fixed in: (no value)



Subject: Deep recursion on subroutine "SQL::Parser::non_parens_search"
Hi, I'm forwarding to you this bug report we got in Debian for your module: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=381015 I try to parse file gerenated with mysqldumpslow and I have error Deep recursion on subroutine "SQL::Parser::non_parens_search" at /usr/share/perl5/SQL/Parser.pm line 1553, <> line 14. Deep recursion on subroutine "SQL::Parser::non_parens_search" at /usr/share/perl5/SQL/Parser.pm line 1559, <> line 14. with a query contains 'IN': SELECT m.word_id FROM phpbb_search_wordmatch m, phpbb_search_wordlist w WHERE w.word_text IN ( 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S') AND m.word_id = w.word_id I'm also attaching the reporting user's script - but it basically just implements this query.
Subject: deep_recusion.pl
#!/usr/bin/perl -w use strict; use SQL::Statement; # apt-get install libsql-statement-perl $_="SELECT m.word_id FROM phpbb_search_wordmatch m, phpbb_search_wordlist w WHERE w.word_text IN ( 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S', 'S') AND m.word_id = w.word_id"; #create a parser object my $parser = SQL::Parser->new('AnyData' , {RaiseError=>0} ); my $stmt = eval { SQL::Statement->new($_, $parser) };
We've got a similar report via e-Mail and decided the best solution for it would be an internal design change which would also allow sub-selects. This may take a while. If the reporter has another patch which would solve the problem meanwhile, I would review and apply it ...
Fixed in 1.21 - with native IN/BETWEEN support.