During menu_link_save() the code attempts to find a parent for the new item, but doesn't check to see if the parent ID it's looking for is 0 (which should never exist anyways).
For me it saves 390 queries during a "cache clear".
Patch checks for 0, then doesn't do a query.
This is important, as I need to speed up cache clears to avoid this race condition:
#246653: Duplicate entry in menu_router: Different symptoms, same issue Comment #228
Related Issues:
This issue has my patch, but the people in here started to get a little too fancy, and this code never got committed.
#302638: No-op and slow queries during menu rebuild
Appears this is also related to a bug in D6 with regards to parenting items (which doesn't look like it has a fix any time soon)
#550254: Menu links are sometimes not properly re-parented
Attachment | Size | Status | Test result | Operations |
---|---|---|---|---|
menu-NeverHasMLIDZero-D6.patch | 573 bytes | Idle | PASSED: [[SimpleTest]]: [MySQL] 190 pass(es). | View details | Re-test |