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"
Download (untitled) / with headers
text/plain 379b
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.
Download (untitled) / with headers
text/plain 902b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.