Skip Menu |
 

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

Report information
The Basics
Id: 31034
Status: new
Priority: 0/
Queue: SQL-Translator

People
Owner: Nobody in particular
Requestors: hemingway [...] cpan.org
Cc:
AdminCc:

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



Subject: Field comments with embedded ' aren't recognised properly
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 736
Download (untitled) / with headers
text/plain 736b
Some of our tables have definitions like: CREATE TABLE table_name ( `ID` int(11) COMMENT 'text ''quoted text'' more text', `keyword` text NOT NULL, etc Note the quoted text in the comment. The grammar for field comments doesn't allow embedded ' in comments, and so it doesn't recognise the above as a valid field definition. The patch below (against 0.08001) solves this problem --- lib/SQL/Translator/Parser/MySQL.pm.orig 2007-09-26 15:11:16.000000000 +0100 +++ lib/SQL/Translator/Parser/MySQL.pm 2007-11-28 14:50:46.000000000 +0000 @@ -370,7 +370,7 @@ } -field_comment2 : /comment/i /'.*?'/ +field_comment2 : /comment/i /'.*?(?<!')'(?!')/ { my $comment = $item[2]; $comment =~ s/^'//;


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.