[TYPO3-core] RFC #12897: Cannot parse SQL hints
Martin Kutschker
masi-no at spam-typo3.org
Thu Dec 3 11:49:40 CET 2009
Xavier Perseguers schrieb:
> Hi,
>
> This is an SVN patch request.
>
> Type: bugfix
>
> BT reference:
> http://bugs.typo3.org/view.php?id=12897
>
> Branches: trunk, 4_3
>
> Problem:
>
> RealURL uses SQL hint in method encodeSpURL_encodeCache (line 664 of
> class.tx_realurl.php):
>
> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('/*! SQL_NO_CACHE */
> content', ...
>
> This cannot be parsed and gives a fatal error in FE:
>
> PHP Catchable Fatal Error: Argument 1 passed to
> ux_t3lib_DB::_quoteFieldNames() must be an array, string given, called
> in /path/to/dbal/class.ux_t3lib_db.php on line 978 and defined in
> /path/to/dbal/class.ux_t3lib_db.php line 990
>
> Solution:
>
> Allow hints to be parsed, in DBAL, simply drop them as remapping should
> be done in order to support different DBMS. This is a bit tricky thus,
> simply drop them ATM.
Actually all SQL comments in all places of the query should be skipped in the processing for DBAL.
Not all comments are hints, so maybe the naming of the variables and functions is a bit misleading.
Furthermore IIRC hints can appear also on other places , not only right at the beginning.
Masi
More information about the TYPO3-team-core
mailing list