You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR (line 3): Invalid statement: Was expecting comment, or use, or
set, or drop, or create, or alter, or insert, or
delimiter, or empty statement
Error: translate: Error with parser 'SQL::Translator::Parser::MySQL': no results at ~/perl5/perlbrew/perls/perl-5.22.4/bin/sqlt-graph line 195.
The following SQL was used to produce the error:
SET NAMES 'utf8';
CREATEDATABASEexample CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE example;
CREATETABLEarticel (
id INTEGERNOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
When I remove CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci from the create statement, it parses just fine.
Note: The character set for the table does not produce an error.
The text was updated successfully, but these errors were encountered:
borisdaeppen
changed the title
SQL::Translator::Parser::MySQL doesn't accept character set in create
SQL::Translator::Parser::MySQL doesn't accept 'character set' in 'create'
Mar 5, 2018
borisdaeppen
changed the title
SQL::Translator::Parser::MySQL doesn't accept 'character set' in 'create'
SQL::Translator::Parser::MySQL doesn't accept 'character set' in 'create database'
Mar 5, 2018
borisdaeppen
changed the title
SQL::Translator::Parser::MySQL doesn't accept 'character set' in 'create database'
SQL::Translator::Parser::MySQL doesn't accept 'character set' after 'create database'
Mar 5, 2018
I'll might give it a try and create a patch, if someone with a good amount of background knowledge on MySQL (or somebody from the devs of sqlfairy) can confirm that this is a valid issue.
This statement:
sqlt-graph -f MySQL -o fail.png -t png fail.sql
produces the following error:
The following SQL was used to produce the error:
When I remove
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
from the create statement, it parses just fine.Note: The character set for the table does not produce an error.
According to https://dev.mysql.com/doc/refman/5.7/en/charset-database.html the used syntax for a character set in
create
should be valid.The text was updated successfully, but these errors were encountered: