Subject: | Parser hangs for statements with quoted DEFINER |
Date: | Wed, 11 Apr 2018 10:32:11 +0300 |
To: | bug-DBIx-MyParsePP [...] rt.cpan.org |
From: | Andrius Merkys <andrius.merkys [...] gmail.com> |
To whom it may concern
The parser hangs interminably for CREATE VIEW statements with quoted definer host, for example "DEFINER = root@`localhost`" (or "DEFINER = root@'localhost'"):
$ perl bin/mylexpp.pl 'CREATE ALGORITHM=UNDEFINED DEFINER = root@`localhost` SQL SECURITY DEFINER VIEW `view` AS select `column` FROM `table`'
$VAR1 = \bless( [
'CREATE',
'CREATE'
], 'DBIx::MyParsePP::Token' );
$VAR1 = \bless( [
'ALGORITHM_SYM',
'ALGORITHM'
], 'DBIx::MyParsePP::Token' );
$VAR1 = \bless( [
'EQ',
'='
], 'DBIx::MyParsePP::Token' );
$VAR1 = \bless( [
'UNDEFINED_SYM',
'UNDEFINED'
], 'DBIx::MyParsePP::Token' );
$VAR1 = \bless( [
'DEFINER_SYM',
'DEFINER'
], 'DBIx::MyParsePP::Token' );
$VAR1 = \bless( [
'EQ',
'='
], 'DBIx::MyParsePP::Token' );
$VAR1 = \bless( [
'IDENT',
'root'
], 'DBIx::MyParsePP::Token' );
where it has to be stopped manually. The other variants, namely "DEFINER = `root`@`localhost`", "DEFINER = `root`@localhost" and "DEFINER = root@localhost" seem to be parsed fine.
Distribution name and version: DBIx-MyParsePP-0.50
Perl version: This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
Operating System vendor and version: Linux <host> 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Best,
Andrius
--
Andrius Merkys
Vilnius University Institute of Biotechnology, Saulėtekio al. 7, room V325
LT-10257 Vilnius, Lithuania