php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75666 mysqli_begin_transaction GOOD work on mysql 5.5.58
Submitted: 2017-12-12 00:30 UTC Modified: 2018-01-29 22:08 UTC
From: root_x at ukr dot net Assigned: vrana (profile)
Status: Closed Package: MySQLi related
PHP Version: Irrelevant OS: Linux 4.4.0-62-generic 64bit
Private report: No CVE-ID: None
 [2017-12-12 00:30 UTC] root_x at ukr dot net
Description:
------------
On localhost:
    mysql server 5.5.58
    php 5.5.9

mysqli_begin_transaction works without any problems ( https://www.youtube.com/watch?v=OQoU02zLwFw ).

But in the documentation it is written that for work it is required mysql 5.6 or higher: http://php.net/manual/en/mysqli.begin-transaction.php

Why the code works on the mysql version 5.5.58 ?

I do not understand something :(

https://stackoverflow.com/questions/47762765/mysqli-begin-transaction-work-on-mysql-5-5-57?noredirect=1#comment82487811_47762765


Expected result:
----------------
I was expecting an error message.


Actual result:
--------------
NO bug.Š•verything works well. BUT so it should not be.(?)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-12 01:04 UTC] requinix@php.net
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2017-12-12 01:04 UTC] requinix@php.net
mysqli_begin_transaction basically just builds and executes a START TRANSACTION statement.

The only thing that requires MySQL >=5.6 are the READ ONLY and READ WRITE modes. Plain transactions and WITH CONSISTENT SNAPSHOT transactions will work with MySQL 5.5. This is already enforced correctly by PHP.
https://dev.mysql.com/doc/refman/5.5/en/commit.html
 [2017-12-12 01:58 UTC] root_x at ukr dot net
Will there be any changes on the site in the documentation? Or at least a comment on the documentation?
 [2017-12-12 02:01 UTC] requinix@php.net
Yes, the documentation will be updated.
 [2017-12-12 02:09 UTC] root_x at ukr dot net
Good. 

I thought that only I alone did not understand this "problem". 

I previously noticed some errors in the translation. I can report them through a bug tracker.

(Only I need to carefully fill in the fields when registering bugreport).
 [2017-12-12 10:17 UTC] spam2 at rhsoft dot net
> Requires MySQL 5.6 and above, and the InnoDB engine (it is enabled by default)

this is nonsense, it needs InnoDB which became default in 5.6 but si available for ages now and frankly it don't even need PHP 5.5 for transactions to work, just InnoDB and plain SQL (HP 5 >= 5.5.0, PHP 7)

https://dev.mysql.com/doc/refman/5.5/en/commit.html
 [2018-01-29 22:08 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=344078
Log: Clarify when MySQL 5.6 is needed (bug #75666)
 [2018-01-29 22:08 UTC] vrana@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: vrana
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC