Subject: | Can’t parseMySQL’s table COMMENT |
Date: | Fri, 15 Dec 2006 14:41:39 -0200 |
To: | bug-SQL-Translator [...] rt.cpan.org |
From: | Leandro Guimarães Faria Corcete DUTRA <leandro [...] dutra.fastmail.fm> |
First thing, thank you very much for this amazing piece of software.
I received the following error:
ldutra@sptech05:~$ sqlt -d --from=MySQL --to=HTML --pretty --title=orolixPrize ~/var/tmp/pz.mysql > /srv/www/pz.html
[SQL::Translator] Got parser: code ref
[SQL::Translator] Got producer: code ref
[SQL::Translator] Got parser: SQL::Translator::Parser::MySQL::parse
[SQL::Translator] Got producer: SQL::Translator::Producer::HTML::produce
[SQL::Translator] Got filename: '/home/ldutra/var/tmp/pz.mysql'
[SQL::Translator] Opening '/home/ldutra/var/tmp/pz.mysql' to get contents.
[SQL::Translator]
ERROR (line 151): Invalid statement: Was expecting comment, or use, or
set, or drop, or create, or alter, or insert
Error: translate: Error with parser 'SQL::Translator::Parser::MySQL': no results at /usr/bin/sqlt line 290.
ldutra@sptech05:~$
But the DDL seems innocent enough:
CREATE TABLE `rv_extra` (
`idEcommOrder` bigint(20) NOT NULL default '0',
`codigoOrolix` bigint(20) NOT NULL default '0',
`codigoRV` bigint(20) NOT NULL default '0',
`produto` bigint(20) NOT NULL default '0',
`preco` decimal(19,3) NOT NULL default '0.000',
`face` decimal(19,3) NOT NULL default '0.000',
`vencimento` date NOT NULL default '0000-00-00',
`pago` decimal(1,0) NOT NULL default '0',
`pin` varchar(50) NOT NULL default '',
`lote` int(11) NOT NULL default '0',
`serie` bigint(20) NOT NULL default '0',
`mensagem` varchar(255) NOT NULL default '',
`operadora` varchar(50) NOT NULL default '',
`estado` varchar(2) NOT NULL default '',
`login` varchar(20) NOT NULL default '',
`nomeCurtoProduto` varchar(50) NOT NULL default '',
PRIMARY KEY (`idEcommOrder`),
CONSTRAINT `fk_rvxtr` FOREIGN KEY (`idEcommOrder`) REFERENCES `orolixPrizeManager`.`EcommerceOrder` (`idEcommOrder`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='RV transaction confirmation information (cell card purchase)';
ldutra@sptech05:~$ perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
ldutra@sptech05:~$ uname -a
Linux sptech05 2.6.18-1-vserver-k7 #1 SMP Sat Oct 21 20:36:05 UTC 2006 i686 GNU/Linux
ldutra@sptech05:~$ aptitude show sqlfairy
Pacote: sqlfairy
Novo: sim
Estado: instalado
Automaticamente instalado: não
Versão: 0.07-4
Prioridade: opcional
Seção: perl
Mantenedor: Eric Dorland <eric@debian.org>
Tamanho Descompactado: 131k
Depende de: perl, libsql-translator-perl (= 0.07-4), libgraphviz-perl
Descrição: SQL translation utilities
SQL::Translator (aka SQLFairy) is a group of Perl modules that manipulate
structured data definitions (mostly database schemas) in interesting ways, such
as converting among different dialects of CREATE syntax (e.g.,
MySQL-to-Oracle), visualizations of schemas (pseudo-ER diagrams: GraphViz or
GD), automatic code generation (using Class::DBI), converting non-RDBMS files
to SQL schemas (xSV text files, Excel spreadsheets), serializing parsed schemas
(via Storable, YAML and XML), creating documentation (HTML and POD), and more.
This package contains various command-line utilities to do the translations and
visualizations.
ldutra@sptech05:~$ aptitude show libsql-translator-perl
Pacote: libsql-translator-perl
Novo: sim
Estado: instalado
Automaticamente instalado: não
Versão: 0.07-4
Prioridade: opcional
Seção: perl
Mantenedor: Eric Dorland <eric@debian.org>
Tamanho Descompactado: 3486k
Depende de: perl (>= 5.6.0-16), libdbi-perl, libclass-base-perl,
libclass-data-inheritable-perl (>= 0.02), libclass-makemethods-perl,
liblog-log4perl-perl, libtemplate-perl (>= 2.10),
libparse-recdescent-perl (>= 1.94), libgd-gd2-noxpm-perl |
libgd-gd2-perl, libgraphviz-perl, libspreadsheet-parseexcel-perl (>=
0.2602), libxml-writer-perl (>= 0.500), libxml-xpath-perl (>= 1.13),
libyaml-perl (>= 0.39)
Descrição: SQL translation library
SQL::Translator (aka SQLFairy) is a group of Perl modules that manipulate
structured data definitions (mostly database schemas) in interesting ways, such
as converting among different dialects of CREATE syntax (e.g.,
MySQL-to-Oracle), visualizations of schemas (pseudo-ER diagrams: GraphViz or
GD), automatic code generation (using Class::DBI), converting non-RDBMS files
to SQL schemas (xSV text files, Excel spreadsheets), serializing parsed schemas
(via Storable, YAML and XML), creating documentation (HTML and POD), and more.
Tags: devel::lang:perl
ldutra@sptech05:~$
--
+55 (11) 5685 2219 xmpp:leandrod@jabber.org
+55 (11) 9406 7191 Yahoo!: ymsgr:sendIM?lgcdutra
+55 (11) 5686 9607 ICQ/AIM: aim:GoIM?screenname=61287803
MSN: msnim:chat?contact=leandro@dutra.fastmail.fm