You need to complete a transaction in multiple DML requests. In the first

mysql> START TRANSACTION; 

, in the following - the request itself, and in the last -

 mysql> COMMIT 

. The engine is InnoDB, SET AUTOCOMMIT=0 , but for some reason all the same every request is committed immediately.

  • How did you determine the instant commit? What is the isolation level? - etki
  • @Fike isolation level - REPEATABLE READ . Opened 1 more tab phpmysql and made SELECT * - voipp
  • @voipp and the teams also start from mayadmin? - etki
  • @Fike yes yes - voipp
  • @Fike earned! if the level is REPEATABLE READ , then there is a phantom read problem. At the same time, at the start of a transaction, the database that is relevant at the time of the start of the transaction is available to it. She apparently keeps a snapshot of the database in memory? And I don’t understand why levels are so called? - voipp

1 answer 1

@voipp , you do not have transactions if you issue commands one by one. Each time the page loads, it reconnects to the database. Want to see everything live - open the console.