[TYPO3-core] RFC #12071: t3lib_sqlparser is not able to parse alias of a joined table

Xavier Perseguers typo3 at perseguers.ch
Tue Sep 29 07:55:32 CEST 2009


Hi,

This morning I though that I could write the patch a bit better to even more respect the way it should parse SQL. Here is v2.

Not to mention that the "AS alias" part is not needed (of course) and that the "AS" itself may be omitted.

Regards

Xavier Perseguers wrote:
> Hi,
> 
> This is a RFC patch request.
> 
> Type: Bugfix
> 
> Branches: trunk (at least) but 4.2 and 4.1 would apply too
> 
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=12071
> 
> Problem:
> Bug 5120 already reported a similar problem (although it is possible 
> that there was still another problem) and more recently, with 
> feeditadvanced, having DBAL installed makes use of Core's SQL parser and 
> gives this error:
> 
> DBAL fatal error: No handler found in handler_getFromTableList() for: 
> "sys_lockedrecords AS locks LEFT JOIN be_users AS user ON 
> locks.userid=user.uid" (SQL engine parse ERROR: No join fields found in 
> parseFromTables()!: near "user ON locks.userid=user.uid ")
> 
> Problem is that the "AS user" from "LEFT JOIN be_users AS user" is not 
> supported by Core's SQL parser.
> 
> Solution:
> It could be possible to remove the alias part of the join in the 
> corresponding query ("AS user") and this would work but I find it more 
> useful to make the Core SQL parser a bit more powerful.
> 
> Regards.
> 
> Sidenote: I hope being able to quickly (!) get enough +1's as it is 
> (sadely) not located within DBAL and I fear only DBAL suffer from this bug.
> 


-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 12071_v2.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090929/aab2d4b0/attachment-0001.txt 


More information about the TYPO3-team-core mailing list