View Issue Details

IDProjectCategoryView StatusLast Update
0002366OXID eShop (all versions)1.02. Price calculations (discounts, coupons, additional costs etc.)public2012-12-07 15:07
Reporterhenrik.steffen 
PriorityhighSeveritycriticalReproducibilityalways
Status resolvedResolutionfixed 
Platformonly OXID Enterprise EditionOSallOS Versionall
Product Version4.4.5 revision 31315 
Target VersionFixed in Version4.4.7 revision 33396 
Summary0002366: Database lock/crash when discount item is selected
DescriptionWhen I want to give an additional item as discount, I pick a category in the select field on the right side, and then the discount_main.php reloads automatically through javascript.

With just 10.000 articles in oxarticles and option "show variants in admin lists" activated this crashes the mysql database, and no article list is being displayed on the left select-field.

Reason is the behaviour of views, because they won't utilize indexes in the correct manner. The query needs more than 250 seconds to complete.

So, this only affects the Enterprise Edition.

If the query is sent with regular tables, the query is <0.05 seconds.

Problem is the _loadArticleList() in discount_main.php

Since 4.4.X there is a new part:

$sSelect .= $this->getConfig()->getConfigParam( 'blVariantsSelection' )?" ( $sArticleTable.oxid=oxobject2category.oxobjectid or $sArticleTable.oxparentid=oxobject2category.oxobjectid) ":" $sArticleTable.oxid=oxobject2category.oxobjectid ";

Just this little "or" makes the whole view query slow.



Steps To Reproducesee above
Additional Informationa much better working solution for the query that needs to be sent is this:

select distinct oxid, oxartnum
from (
SELECT oxv_oxarticles_1.oxid, oxv_oxarticles_1.oxartnum
FROM oxv_oxarticles_1
LEFT JOIN oxv_oxobject2category_1 AS oxobject2category
ON oxv_oxarticles_1.oxid = oxobject2category.oxobjectid
WHERE oxobject2category.oxcatnid = 'ox_436'
union
SELECT oxv_oxarticles_1.oxid, oxv_oxarticles_1.oxartnum
FROM oxv_oxarticles_1
LEFT JOIN oxv_oxobject2category_1 AS oxobject2category
ON oxv_oxarticles_1.oxparentid = oxobject2category.oxobjectid
WHERE oxobject2category.oxcatnid = 'ox_436'
) as b


TagsDiscount
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

birute_meilutyte

2011-02-01 09:31

reporter   ~0004042

free product, assigned to discount, is allways displayed in DE lang. its title should be displayed in the same language, as the details of discount. check attached img for more info (discount title is in EN lang, but assigned product is in DE)

birute_meilutyte

2011-02-01 09:32

reporter  

itm_discount.png (24,731 bytes)
itm_discount.png (24,731 bytes)

birute_meilutyte

2011-02-02 11:05

reporter   ~0004058

also in EE version, in ajax list, after product is dragged to assigned products list, it is not displayed in there.