Forums / Developer / Innodb error on 4.0.1

Innodb error on 4.0.1

Author Message

H-Works Agency

Thursday 08 January 2009 5:13:07 am

Hello,

I becoming crazy with a lot of innodb error using ezpublish 4.0.1.

Here is the log i have :

Query error: Lock wait timeout exceeded; try restarting transaction. Query: INSERT INTO ezsearch_tmp_0 SELECT DISTINCT ezsearch_object_word_link.contentobject_id, ezsearch_object_word_link.published
                                         FROM ezcontentobject,
                                              ezsearch_object_word_link
                                              ,
                                              ezcontentclass,
                                              ezcontentobject_tree
                                              
                                         WHERE
                                               
                                               
                                               
                                               
                                               ezsearch_object_word_link.word_id='10082' AND 
                                               
                                         ezcontentobject.id=ezsearch_object_word_link.contentobject_id and
                                         ezcontentobject.contentclass_id = ezcontentclass.id and
                                         ezcontentclass.version = '0' and
                                         ezcontentobject.id = ezcontentobject_tree.contentobject_id and
                                         ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id

I don't understand where does this come from. I think its due to "eztag" operator in ezflow but i am not shure.

Anybody has seen that already ?

Thanx in advance

EZP is Great

André R.

Thursday 08 January 2009 7:50:49 am

No, this is from the ezsearch search engine.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

H-Works Agency

Thursday 08 January 2009 8:04:46 am

Hello André,

Do you know why the ezsearch engine is making this query ?

Can this be related to the usage of this action in a php module :

eZOperationHandler::execute( 'content', 'publish',(..));

Or to this operation :

$newVersion = $contentObject->createNewVersion( false, true, $languageCode, false );

Because otherwise i don't see why this query would be fired.

Thanx in advance.

EZP is Great

André R.

Thursday 08 January 2009 8:09:41 am

I'm not sure without searching true the ezsearch code, you can find it in kernel/search/plugins/ezsearchengine/, search for "SELECT DISTINCT ezsearch_object_word_link" or some other clues from the debug.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

H-Works Agency

Friday 09 January 2009 3:44:07 am

The problem seems to be related to the usage of this function in my php module :

$newVersion = $contentObject->createNewVersion( false, true, $languageCode, false );

What is strange is that this code is working perfectly on a certain class but not on another which is creating this transaction bug above.

After digging a little i found that it stop at this point in the above function :

$copiedVersion = $this->copyVersion( $this, $version, $nextVersionNumber, false, $status, $languageCode, $copyFromLanguageCode );

Does anyone know why this "copyVersion" function can't handle certain classes ? Is there a special things to know for using this function ?

Is there special things to know about this copyVersion function ?

Why should we enclose "createNewVersion" in a begin / commit tough its alreay present in the function ?

Thanx in advance for everything

EZP is Great