Description
Repro steps:
- have an open mysqli connection
- start transaction using
mysqli::begin_transaction
- run some query like
analyze table xx, this is "administrative statement" [1] which implicit autocommit
- rollback transaction using
mysqli::rollback and notice no exception is thrown
Since PHP 8.0, PDO checks if a transaction is active and throws an exception: PDOException: There is no active transaction
mysqli must throw the same exception as well.
Related MariaDB tickets:
[1] docs https://dev.mysql.com/doc/refman/8.0/en/implicit-commit.html and repro: https://dbfiddle.uk/coUjimLq
PHP Version
7.4 - master
Operating System
any