View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002366 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2011-01-05 20:30 | 2012-12-07 15:07 |
Reporter | henrik.steffen | Assigned To | |||
Priority | high | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | only OXID Enterprise Edition | OS | all | OS Version | all |
Product Version | 4.4.5 revision 31315 | ||||
Fixed in Version | 4.4.7 revision 33396 | ||||
Summary | 0002366: Database lock/crash when discount item is selected | ||||
Description | When 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 Reproduce | see above | ||||
Additional Information | a 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 | ||||
Tags | Discount | ||||
Attached Files | |||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
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) |
|
also in EE version, in ajax list, after product is dragged to assigned products list, it is not displayed in there. |