ok. I changed the query a bit so the results are easier to compare:
When the bug appears, most rows in the result set of the following query contain NULL as a value, and we have 369 rows.
If I insert the dummy entry in the table plib_objects_plib_objects_dbo_temp, then the bug disappears and now all rows contain numbers (There is not a single NULL row). We also have more rows (430).
The test was done with the following query:
SELECT shop_element_oid
FROM ((`plib_objects_plib_objects_dbo` a20_1_dbo, ((`plib_objects_at_telacc_demopool_shops_product` a20_1_product)
LEFT JOIN ((`plib_objects_at_telacc_demopool_shops_product_distributor` a20_1_distributor) )
ON a20_1_distributor.part_nr = a20_1_product.part_nr),
(`plib_objects_at_telacc_demopool_shops_shop_element` a20_1_shop_element) )
LEFT JOIN ((`plib_objects_plib_objects_dbo` a21_1_dbo, (`plib_objects_plib_objects_dbo_type` a21_1_dbo_type) ) )
ON a21_1_dbo_type.oid = a21_1_dbo.oid AND a20_1_dbo.type_oid = a21_1_dbo.oid
LEFT JOIN ((`plib_objects_plib_objects_dbo` a23_1_dbo, (`plib_objects_at_telacc_demopool_shops_shop_element` a23_1_shop_element) , (`plib_objects_at_telacc_demopool_shops_category` a23_1_shop_category) )
LEFT JOIN ((`plib_objects__telacc_demopool_shops_category__shop_element` a23_1_children) )
ON a23_1_children.oid = a23_1_dbo.oid)
ON a23_1_shop_element.oid = a23_1_dbo.oid AND a23_1_shop_category.oid = a23_1_dbo.oid AND a20_1_dbo.oid = a23_1_children.shop_element_oid
LEFT JOIN ((`plib_objects_plib_objects_dbo_temp` a20_1_temp) )
ON a20_1_temp.oid = a20_1_dbo.oid )
LEFT JOIN ((`plib_objects_at_telacc_demopool_shops_shop_element__shop` a20_1_shops)
LEFT JOIN ((`plib_objects_plib_objects_dbo` a22_1_dbo, (`plib_objects_at_telacc_demopool_shops_shop` a22_1_shop) ) )
ON ((a20_1_shops.flags & 4) = 4) AND a22_1_shop.oid = a22_1_dbo.oid AND a20_1_shops.shop_oid = a22_1_dbo.oid)
ON a20_1_shops.oid = a20_1_dbo.oid
WHERE
a20_1_product.oid = a20_1_dbo.oid AND a20_1_shop_element.oid = a20_1_dbo.oid
ok. I changed the query a bit so the results are easier to compare:
When the bug appears, most rows in the result set of the following query contain NULL as a value, and we have 369 rows.
If I insert the dummy entry in the table plib_objects_ plib_objects_ dbo_temp, then the bug disappears and now all rows contain numbers (There is not a single NULL row). We also have more rows (430).
The test was done with the following query: objects_ plib_objects_ dbo` a20_1_dbo, ((`plib_ objects_ at_telacc_ demopool_ shops_product` a20_1_product) objects_ at_telacc_ demopool_ shops_product_ distributor` a20_1_distributor) ) or.part_ nr = a20_1_product. part_nr) , objects_ at_telacc_ demopool_ shops_shop_ element` a20_1_shop_element) ) objects_ plib_objects_ dbo` a21_1_dbo, (`plib_ objects_ plib_objects_ dbo_type` a21_1_dbo_type) ) ) objects_ plib_objects_ dbo` a23_1_dbo, (`plib_ objects_ at_telacc_ demopool_ shops_shop_ element` a23_1_shop_element) , (`plib_ objects_ at_telacc_ demopool_ shops_category` a23_1_shop_ category) ) objects_ _telacc_ demopool_ shops_category_ _shop_element` a23_1_children) ) element. oid = a23_1_dbo.oid AND a23_1_shop_ category. oid = a23_1_dbo.oid AND a20_1_dbo.oid = a23_1_children. shop_element_ oid objects_ plib_objects_ dbo_temp` a20_1_temp) ) objects_ at_telacc_ demopool_ shops_shop_ element_ _shop` a20_1_shops) objects_ plib_objects_ dbo` a22_1_dbo, (`plib_ objects_ at_telacc_ demopool_ shops_shop` a22_1_shop) ) ) shop_oid = a22_1_dbo.oid) element. oid = a20_1_dbo.oid
SELECT shop_element_oid
FROM ((`plib_
LEFT JOIN ((`plib_
ON a20_1_distribut
(`plib_
LEFT JOIN ((`plib_
ON a21_1_dbo_type.oid = a21_1_dbo.oid AND a20_1_dbo.type_oid = a21_1_dbo.oid
LEFT JOIN ((`plib_
LEFT JOIN ((`plib_
ON a23_1_children.oid = a23_1_dbo.oid)
ON a23_1_shop_
LEFT JOIN ((`plib_
ON a20_1_temp.oid = a20_1_dbo.oid )
LEFT JOIN ((`plib_
LEFT JOIN ((`plib_
ON ((a20_1_shops.flags & 4) = 4) AND a22_1_shop.oid = a22_1_dbo.oid AND a20_1_shops.
ON a20_1_shops.oid = a20_1_dbo.oid
WHERE
a20_1_product.oid = a20_1_dbo.oid AND a20_1_shop_