Skip Menu |

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

Report information
The Basics
Id: 50469
Status: resolved
Priority: 0/
Queue: SQL-Translator

People
Owner: Nobody in particular
Requestors: GWS [...] cpan.org
Cc: gisbert.selke [...] wido.bv.aok.de
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.11003
Fixed in: 0.11011



CC: gisbert.selke [...] wido.bv.aok.de
Subject: Error parsing MySQL CREATE VIEW
The following MySQL CREATE statement CREATE DEFINER='usr@%' VIEW w AS select a from v; triggers an error ERROR (line 1): Invalid statement: Was expecting comment, or use, or set, or drop, or create, or alter, or insert, or delimiter, or empty statement Removing the DEFINER=... clause will yield empty output from sqlt if run without --validate, or an "invalid schema" error. It seems that CREATE VIEW is not supported. Should I expect it to be?
On Tue Oct 13 19:29:20 2009, GWS wrote: Show quoted text
> The following MySQL CREATE statement > CREATE DEFINER='usr@%' VIEW w AS select a from v; > triggers an error > ERROR (line 1): Invalid statement: Was expecting comment, or use, or > set, or drop, or create, or alter, or insert, or > delimiter, or empty statement > > Removing the DEFINER=... clause will yield empty output from sqlt if run > without --validate, or an "invalid schema" error. > > It seems that CREATE VIEW is not supported. Should I expect it to be?
It indeed looks like it, but this situation can be remedied without much effort. Please provide a couple of view definitions to be appended to: https://sqlfairy.svn.sourceforge.net/svnroot/sqlfairy/trunk/sqlfairy/t/data/mysql/create.sql Then we can codify the result in a test and adjust the grammar to deal with this.
No reply from ticket author, stalling indefinitely.
Recent work on the mysql parser should have solve this problem. Feel free to reopen this ticket if the problem persists.