Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293443

MySQL on PHP 8 now errors when committing or rolling back when there is no active transaction

$
0
0

Problem/Motivation

This @todo exists in Drupal\KernelTests\Core\Database\TransactionTest::testTransactionWithDdlStatement()

      try {
        $transaction->rollback();
        unset($transaction);
        // @TODO: an exception should be triggered here, but is not, because
        // "ROLLBACK" fails silently in MySQL if there is no transaction active.
        // $this->fail(t('Rolling back a transaction containing DDL should fail.'));
      }

This has been fixed in PHP 8.0 due to https://github.com/php/php-src/commit/990bb34891c83d12c5129fd781893704f9...

Now we have to deal with the fact that PHP 7 and PHP 8 behave in different ways.

Proposed resolution

Remaining tasks

User interface changes

None

API changes

Data model changes

None

Release notes snippet


Viewing all articles
Browse latest Browse all 293443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>