Issue Bug Closed

#43470SQL engine parse ERROR: Still content in clause after parsing!: near "; "

Stefan Neufeind 11/29/12, 23:36 updated 10/02/18, 12:14

Description

(this occured when using dbal – but problem is in the sql-parser in core)

How to reproduce:
  • dbal activated
  • installing “dam”

Fails with exception
> SQL engine parse ERROR: Still content in clause after parsing!: near “; “
thrown in parseCREATEDATABASE() in
typo3/sysext/core/Classes/Database/SqlParser.php

Query leading to this:
string(308) “CREATE TABLE tx_dam_media_types (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT ‘0’ NOT NULL,
ext varchar(5) DEFAULT ‘’ NOT NULL,
mime varchar(64) DEFAULT ‘’ NOT NULL,
type int(11) DEFAULT ‘0’ NOT NULL,
icon varchar(64) DEFAULT ‘’ NOT NULL,
PRIMARY KEY (uid),
KEY parent (pid)
);
”

Doing a trim() on the query beforehand it works without any problems. I expect there are newlines or maybe a tab at the end of that string.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.