Bug #43470
SQL engine parse ERROR: Still content in clause after parsing!: near "; "
Status: | Resolved | Start date: | 2012-11-29 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Stefan Neufeind | % Done: | 100% |
|
Category: | Database API | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.0 | Is Regression: | ||
PHP Version: | Sprint Focus: | |||
Complexity: |
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.
Associated revisions
[BUGFIX] SqlParser: trim all kinds of whitespaces
SqlParser only trimmed semicolon and newlines
from end of string. Make it strip all characters
usually stripped by trim().
Add a unit test to avoid regressions.
Change-Id: I2ddc1fca2ac0db1b6ca0989c93c37ab39e0675d8
Fixes: #43470
Releases: 4.5, 4.6, 4.7, 6.0, 6.1
Reviewed-on: http://review.typo3.org/16875
Tested-by: Stefan Neufeind
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] SqlParser: trim all kinds of whitespaces
SqlParser only trimmed semicolon and newlines
from end of string. Make it strip all characters
usually stripped by trim().
Add a unit test to avoid regressions.
Change-Id: I2ddc1fca2ac0db1b6ca0989c93c37ab39e0675d8
Fixes: #43470
Releases: 4.5, 4.6, 4.7, 6.0, 6.1
Reviewed-on: http://review.typo3.org/16912
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] SqlParser: trim all kinds of whitespaces
SqlParser only trimmed semicolon and newlines
from end of string. Make it strip all characters
usually stripped by trim().
Change-Id: I2ddc1fca2ac0db1b6ca0989c93c37ab39e0675d8
Fixes: #43470
Releases: 4.5, 4.6, 4.7, 6.0, 6.1
Reviewed-on: http://review.typo3.org/16913
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] SqlParser: trim all kinds of whitespaces
SqlParser only trimmed semicolon and newlines
from end of string. Make it strip all characters
usually stripped by trim().
Change-Id: I2ddc1fca2ac0db1b6ca0989c93c37ab39e0675d8
Fixes: #43470
Releases: 4.5, 4.6, 4.7, 6.0, 6.1
Reviewed-on: http://review.typo3.org/16914
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
[BUGFIX] SqlParser: trim all kinds of whitespaces
SqlParser only trimmed semicolon and newlines
from end of string. Make it strip all characters
usually stripped by trim().
Change-Id: I2ddc1fca2ac0db1b6ca0989c93c37ab39e0675d8
Fixes: #43470
Releases: 4.5, 4.6, 4.7, 6.0, 6.1
Reviewed-on: http://review.typo3.org/16915
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
History
#1 Updated by Stefan Neufeind over 2 years ago
- Assigned To set to Stefan Neufeind
#2 Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16875
#3 Updated by Stefan Neufeind over 2 years ago
Problem lies/can be fixed in trimSql() of the SqlParser in core. It's just triggered by that "random" whitespace-char in create table of dam. See review for details.
#4 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16875
#5 Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16875
#6 Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at http://review.typo3.org/16912
#7 Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/16913
#8 Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/16914
#9 Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/16915
#10 Updated by Stefan Neufeind over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 339f7396c8c00b7c101d1027947a93ecc0e6de97.