note 124882 added to mysqli.begin-transaction

From: Date: Sat, 04 Apr 2020 17:36:40 +0000
Subject: note 124882 added to mysqli.begin-transaction
Groups: php.notes 
Request: Send a blank email to php-notes+get-214416@lists.php.net to get a copy of this message
MySQL 5.6 introduces READ ONLY mode which applies optimizations to your transactions that can only be applied when it knows in advance that no table modifications will be made and that no locks will be issued. The default access mode is READ WRITE in all versions up to and including MySQL 5.6. Starting in MySQL 5.7, the appropriate access mode is detected automatically. So if your transaction attempts modifications or table locks, it will automatically use READ WRITE mode, otherwise it will use READ ONLY mode and your transaction will benefit from the optimizations that come from that without having to explicitly declare is as READ ONLY. Therefore the only time you need to explicitly declare an access mode is when you are using MySQL 5.6 and you are sure that you want READ ONLY mode. Note that any queries that attempt to modify tables or issue locks in READ ONLY mode will fail. Temporary tables can still be modified. (Moderators. This post should replace the previous post that I made on the subject. Thanks.) ---- Server IP: 45.112.84.4 Probable Submitter: 38.142.137.34 (proxied: 2601:1c0:c804:34d0:10f1:bbfb:c85a:f65e) ---- Manual Page -- http://php.net/manual/en/mysqli.begin-transaction.php Edit -- https://master.php.net/note/edit/124882 Del: integrated -- https://master.php.net/note/delete/124882/integrated Del: useless -- https://master.php.net/note/delete/124882/useless Del: bad code -- https://master.php.net/note/delete/124882/bad+code Del: spam -- https://master.php.net/note/delete/124882/spam Del: non-english -- https://master.php.net/note/delete/124882/non-english Del: in docs -- https://master.php.net/note/delete/124882/in+docs Del: other reasons-- https://master.php.net/note/delete/124882 Reject -- https://master.php.net/note/reject/124882 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#214416) next »