php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74140 mysqli_begin_transaction returns FALSE
Submitted: 2017-02-21 11:59 UTC Modified: 2018-01-29 23:34 UTC
From: ajoliveira at ajoliveira dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 7.1.2 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ajoliveira at ajoliveira dot com
New email:
PHP Version: OS:

 

 [2017-02-21 11:59 UTC] ajoliveira at ajoliveira dot com
Description:
------------
mysqli_begin_transaction with MYSQLI_TRANS_START_READ_WRITE consistently returns FALSE even if there is no error reported with mysqli_error

PHP 7.0.13-0ubuntu0.16.04.1 (cli) ( NTS )

mysql  Ver 15.1 Distrib 10.1.21-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Was working on January 4, 2017.

database is InnoDB

Test script:
---------------
example:

$bd=mysqli_connect(NHOST,NUSER,NPASS,NNAME);
	if($bd==FALSE){
		echo mysqli_error();
	        return FALSE;
	}

if(mysqli_begin_transaction($bd,MYSQLI_TRANS_START_READ_WRITE)==FALSE){
		echo mysqli_error();
		mysqli_close($bd);
		return FALSE;
	}


Expected result:
----------------
Returning FALSE only when an error is found


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-29 23:34 UTC] vrana@php.net
-Status: Open +Status: Not a bug
 [2018-01-29 23:34 UTC] vrana@php.net
It requires MySQL 5.6 or higher. MariaDB usually reports itself as MySQL 5.5.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Oct 18 21:03:39 2021 UTC