Skip Menu |

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

Report information
The Basics
Id: 37814
Status: resolved
Worked: 20 min
Priority: 0/
Queue: SQL-Translator

People
Owner: kclark [...] cpan.org
Requestors: tony.kemp [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.08
  • 0.0900
Fixed in: (no value)



Subject: SQLite translator failing to parse schema
The SQLite parser cannot parse the schema that I have attached for some unknown reason. It fails with the following error: ERROR (line 1): Invalid statement: Was expecting begin transaction, or commit, or drop, or comment, or create If I manually insert a "BEGIN TRANSACTION;" at the start of the file, it fails with the same error, but for line 2. I also get the same error when using DBI to extract the schema directly from the SQLite database. This error appears to be independent of the 'to' format. I tried parsing the schema with the MySQL parser to see what would happen. In this case it read the 'CREATE TABLE' fine, but understandably failed on invalid constraints and field types. This error occurs with Perl 5.8.8 on OpenBSD 4.3 on amd64, and Perl 5.8.8 on MacOS X 10.5.4, i386. I experienced this issue with version 0.08 installed using OpenBSD packages and the latest version installed direct from CPAN.
Subject: schema.sql

Message body is not shown because it is too large.

The parser was failing on field and index names with double quotes (was expecting on single or nothing). Also had a problem with AUTOINCREMENT being. All fixed in r1615.