[TYPO3-dev] Fatal Query

Dan Osipov dosipov at phillyburbs.com
Mon Jan 12 21:48:11 CET 2009


Hello all,

We have a serious issue on our hand, and I'm hoping someone will be able 
to provide some workarounds.

Basic issue is that the mySQL DB is freezing due to a query from Typo3 Core.

Here is the set up. We're using the News Admin from the tt_news 3.0.0. 
At one point, the module is calling the function 
setTotalItems($queryParts) from class.db_list (line 485 in Typo3 4.2.3). 
The function runs a Count function, for example:
SELECT count(*)
			FROM tt_news LEFT JOIN tt_news_cat_mm AS mm1 ON tt_news.uid=mm1.uid_local
			WHERE
				pid=15 AND 1=1 AND tt_news.pid > 0 AND tt_news.deleted=0  AND 
tt_news.sys_language_uid=0  AND mm1.uid_foreign IN (15,16,17,...)

I truncated the list of categories - but there are many. Normally the 
query runs fine, returning result in the thousands. But sometimes, the 
query goes into "statistics" state, and locks the tt_news table. The 
query hangs, preventing all other queries from exectuing, and requires a 
manual restart of mySQL.

I can hack tt_news module, but before I do - is there anything else 
someone can recommend?

-- 
Dan Osipov
Calkins Media
http://danosipov.com/blog/




More information about the TYPO3-dev mailing list