[TYPO3-core] RFC #12897: Cannot parse SQL hints
Steffen Kamper
info at sk-typo3.de
Thu Dec 3 13:27:31 CET 2009
Hi,
mysql use a lot of these commands. They are all written in comments
syntax to differ from other commands, and they are ignored by older
versions if they don't know the command.
typical examples:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
vg Steffen
Xavier Perseguers schrieb:
> Hi David,
>
>> Whats about real SQL-Col-Comments?
>> In MySQL it's possible to assign Comments to Cols and in PMA they are
>> visible below the col-titles.
>>
>> I used that for an extension but don't know if it's supported in other
>> DBs / DBMSs
>
> We are not speaking here of adding support for comments while creating
> the DB but supporting "comments" (actually hints in my case) within SQL
> queries. Hints allow additional information to be sent to the DBMS while
> performing (typically) a SELECT query.
>
> In case of RealURL, a query is generated like this:
>
> SELECT /*! SQL_NO_CACHE */ content FROM some-realurl-table WHERE ...
>
> The /*! SQL_NO_CACHE */ is a comment but a special comment that is
> understood as a hint by MySQL telling it not to cache the result of the
> query. Dmitry (or Kasper before him?) added this to tweak the
> performance and reliability. However, without this patch, the hint
> cannot be parsed by DBAL.
>
More information about the TYPO3-team-core
mailing list