php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65978 mysqli.commit examples flawed
Submitted: 2013-10-28 00:55 UTC Modified: 2013-11-16 23:26 UTC
From: kbcmdba at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.5Git-2013-10-28 (Git) OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kbcmdba at gmail dot com
New email:
PHP Version: OS:

 

 [2013-10-28 00:55 UTC] kbcmdba at gmail dot com
Description:
------------
The example shown in the mysqli.commit page is flawed. It suggests that users simply commit without checking to see if the commit succeeded or not. As a MySQL DBA, I see this with developers very commonly - they assume that issuing a commit will always succeed and conflicts never happen. You can help guard against that misconception. Please stop perpetuating the problem by showing developers that it's wise to verify commits actually did commit successfully.

Even when autocommit is turned on, it's still wise to verify that the operation succeeded. Just because a user is using InnoDB doesn't guarantee that there won't be conflicts.

---
From manual page: http://www.php.net/mysqli.commit
---


Test script:
---------------
Any script that creates a conflicting change in a separate transaction will cause this to fire off.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-16 23:26 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=332135
Log: Fixed bug #65978 (mysqli.commit examples flawed)
 [2013-11-16 23:26 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2013-11-16 23:26 UTC] kalle@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-07 06:08 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=445e208c388a947aebf94f2a411109798cedc967
Log: Fixed bug #65978 (mysqli.commit examples flawed)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 02:00:02 2026 UTC