View Issue Details

IDProjectCategoryView StatusLast Update
0006736OXID eShop (all versions)1.03. Basket, checkout processpublic2018-01-05 14:52
Reporterd3 Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.0.0 
Fixed in Version6.0.1 
Summary0006736: MySQL transactions will not ended consistent
DescriptionHello,

we found ways to "start transaction"s and how they can be rollbacked by the MySQL server.
The "rollback" should be done by the method, which executed the "start transaction".

In order::finalizeOrder [1] the transaction will be started [2].
There are some return points, that not "commit" or "rollback" the actual transaction [3][4][5].

In dependence of the mysql system variables, there are different ways the transaction will ending.

[1] https://github.com/OXID-eSales/oxideshop_ce/blob/0f286300bb3d437349bcd8e99829713e51cbd243/source/Application/Model/Order.php#L465
[2] https://github.com/OXID-eSales/oxideshop_ce/blob/0f286300bb3d437349bcd8e99829713e51cbd243/source/Application/Model/Order.php#L467
[3] https://github.com/OXID-eSales/oxideshop_ce/blob/0f286300bb3d437349bcd8e99829713e51cbd243/source/Application/Model/Order.php#L474
[4] https://github.com/OXID-eSales/oxideshop_ce/blob/0f286300bb3d437349bcd8e99829713e51cbd243/source/Application/Model/Order.php#L485
[5] https://github.com/OXID-eSales/oxideshop_ce/blob/0f286300bb3d437349bcd8e99829713e51cbd243/source/Application/Model/Order.php#L515
[6] https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_completion_type


best regards
KH
Steps To ReproduceExample

1. frontend login
2. add article to basket
3. go to step order
4. open in a second browser tab, my account and change delivery/invoice address
5. go back to the ordering tab and send the order
6. in finalizeOrder a MySQL transaction will start
7.during the change of the address, finalizeOrder will be return without commit/rollback the transaction and redirect (302) the user to cl=order&iAddressError=1 (OXID Standard)
8. the transaction stay open and will be closed by the MySQL server (rollback). during this, the table entries can be locked.
Additional Informationfor testing we changed this line:
vendor/oxid-esales/oxideshop-ce/source/Core/Controller/BaseController.php

protected function _executeNewAction($sNewAction){
    if(\OxidEsales\Eshop\Core\DatabaseProvider::getDb()->isTransactionActive()) {
        dumpVar(var_export(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), true),true);
    }
    //........
}
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined