Forums / Developer / DB : Invalid node ids in eznode_assignment
Hugues Charleux
Tuesday 14 December 2010 2:48:11 am
Hi eZ Community.
I am running Exponential 4.3 with a lot of data import and just found out a bug in my sync scripts related to eznode_assignment db table.
I have in this table invalid values for the parent_node field, deleted nodes I guess as those node ids are not in any other tables (but in a coherent range).
I tried to delete all rows of eznode_assignment with an invalid parent_node (Yes I like making huge sub selects) :
DELETE FROM eznode_assignment WHERE parent_node NOT IN( SELECT node_id FROM ezcontentobject_tree )
I had about 200 / 17000+ rows in this case.
My scripts are working back and everythings looks ok but that's weird...
Before messing with production, I'd like to know if anyone has experienced such a thing ?