[TYPO3-core] RFC #12897: Cannot parse SQL hints

David Bruchmann typo3-team-core at bruchmann-web.de
Thu Dec 3 13:51:00 CET 2009


----- Ursprüngliche Nachricht -----
Von:        Xavier Perseguers <typo3 at perseguers.ch>
Gesendet:   Donnerstag, 3. Dezember 2009 13:13:25
An:         typo3-team-core at lists.typo3.org
CC:
Betreff:    Re: [TYPO3-core] RFC #12897: Cannot parse SQL hints
> 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.
> 

Hi Xavier,

AFAIK it's just a php-comment and has nothing to do with what is send to 
mySQL.
I mentioned the SQL-Comment-Function as idea to think about if those 
comments are useful as real sql-comments too, so they just could be 
written in another kind or could be converted by dbal.

You know much more about DBs and the commands that are send to DB than 
me, so I'm not disappointed when my idea doesn't make sense in general 
or at this place ;-)

Best Regards
David


More information about the TYPO3-team-core mailing list