Skip to content

"DDL statements are not allowed in transactions" when cleaning the table #2

Description

@real34

We noticed an issue when truncating table in the clearTemporaryIndexTable as part of a transaction (Magento 1.9.1.0-patch2).
The query is considered as a DDL statement and magento triggers an error (appearing in the logs). It fills the log when not in developer mode, and breaks when in developer mode.

Expected: no errors are triggered by Magento

Here is the stack trace of the call:

#1  Varien_Db_Adapter_Pdo_Mysql->query() called at [/path/to/app/htdocs/lib/Varien/Db/Adapter/Pdo/Mysql.php:2497]
#2  Varien_Db_Adapter_Pdo_Mysql->truncateTable() called at [/path/to/app/.modman/Dngdev_Indexfix/app/code/community/Dngdev/Indexer/Model/Resource/Indexer/Stock.php:22]
#3  Dngdev_Indexer_Model_Resource_Indexer_Stock->clearTemporaryIndexTable() called at [/path/to/app/htdocs/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php:245]
#4  Mage_CatalogInventory_Model_Resource_Indexer_Stock->reindexAll() called at [/path/to/app/htdocs/app/code/core/Mage/Index/Model/Indexer/Abstract.php:143]
#5  Mage_Index_Model_Indexer_Abstract->reindexAll() called at [/path/to/app/htdocs/app/code/core/Mage/Index/Model/Process.php:212]
#6  Mage_Index_Model_Process->reindexAll() called at [/path/to/app/htdocs/app/code/community/EcomDev/PHPUnit/Model/Mysql4/Fixture/AbstractEav.php:80]
#7  EcomDev_PHPUnit_Model_Mysql4_Fixture_AbstractEav->runRequiredIndexers() called at [/path/to/app/htdocs/app/code/community/EcomDev/PHPUnit/Model/Fixture/Processor/Eav.php:106]
#8  EcomDev_PHPUnit_Model_Fixture_Processor_Eav->apply() called at [/path/to/app/htdocs/app/code/community/EcomDev/PHPUnit/Model/Fixture.php:458]
#9  EcomDev_PHPUnit_Model_Fixture->apply() called at [/path/to/app/htdocs/app/code/community/EcomDev/PHPUnit/Test/Listener.php:151]
#10 EcomDev_PHPUnit_Test_Listener->startTest() called at [/path/to/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:387]
#11 PHPUnit_Framework_TestResult->startTest() called at [/path/to/app/vendor/phpunit/phpunit/src/Framework/TestResult.php:624]
#12 PHPUnit_Framework_TestResult->run() called at [/path/to/app/vendor/phpunit/phpunit/src/Framework/TestCase.php:760]
#13 PHPUnit_Framework_TestCase->run() called at [/path/to/app/vendor/phpunit/phpunit/src/Framework/TestSuite.php:699]
#14 PHPUnit_Framework_TestSuite->run() called at [/path/to/app/vendor/phpunit/phpunit/src/Framework/TestSuite.php:699]
#15 PHPUnit_Framework_TestSuite->run() called at [/path/to/app/vendor/phpunit/phpunit/src/Framework/TestSuite.php:699]
#16 PHPUnit_Framework_TestSuite->run() called at [/path/to/app/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:426]
#17 PHPUnit_TextUI_TestRunner->doRun() called at [/path/to/app/vendor/phpunit/phpunit/src/TextUI/Command.php:179]
#18 PHPUnit_TextUI_Command->run() called at [/path/to/app/vendor/phpunit/phpunit/src/TextUI/Command.php:132]
#19 PHPUnit_TextUI_Command::main() called at [/path/to/app/vendor/phpunit/phpunit/phpunit:57]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions