Skip Menu |

This queue is for tickets about the DBIx-MyParsePP CPAN distribution.

Report information
The Basics
Id: 125252
Status: open
Priority: 0/
Queue: DBIx-MyParsePP

People
Owner: MERKYS [...] cpan.org
Requestors: MERKYS [...] cpan.org
Cc:
AdminCc:

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



Subject: Can't locate object method "get_quoted_token" via package "DBIx::MyParsePP::Lexer"
Object method DBIx::MyParsePP::Lexer::get_quoted_token() seems to be missing, albeit called in certain circumstances. I have attempted to parse the following incorrect SQL statement: CREATE DEFINER=`root``other` and got the following error: Can't locate object method "get_quoted_token" via package "DBIx::MyParsePP::Lexer" at lib/DBIx/MyParsePP/Lexer.pm line 409, <> line 1.
On Tue May 01 03:33:28 2018, MERKYS wrote: Show quoted text
> I have attempted to parse the following incorrect SQL statement: > > CREATE DEFINER=`root``other`
Doubled quotes in MySQL strings are valid escapes, at least for single and double quotes [1]. I have adapted get_quoted_token() from MySQL lexer, so now it works, but for backticks only (see t/ticket_125252_backticks.t). Moreover, it prints some warnings: andrius@tasmanijos-velnias DBIx-MyParsePP $ PERL5LIB=lib perl -w t/ticket_125252_backticks.t 1..1 Use of uninitialized value in exists at /usr/share/perl5/Parse/Yapp/Driver.pm line 280. Use of uninitialized value in hash element at /usr/share/perl5/Parse/Yapp/Driver.pm line 280. Use of uninitialized value in string ne at /usr/share/perl5/Parse/Yapp/Driver.pm line 313. ok 1 [1] https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-back-ticks-in-mysql#11321508