newrelic-php-agent: Mysqli_commit fails on PHP agent v9.17.0.300
When we call mysqli->commit() to commit a transaction, it returns NULL instead of a boolean. Sometimes the transaction works, sometimes it does not. This issue has been mentioned on New Relic’s forums so we aren’t the only people encountering this.
Steps to Reproduce
Here’s a short test script that shows the problem.
<?php
$mysqli = new mysqli('[database location]', '[db user]', '[db password]', '[database]');
$com = $mysqli->autocommit(false);
$result = $mysqli->query("INSERT into mytestdatabase.test_table (name) VALUES ('John Doe')");
$success = $mysqli->commit();
var_dump($success); // Outputs NULL
Expected Behavior
I’d expect $mysqli->commit to return true if the transaction was committed, or false if it failed.
Relevant Logs / Console output
There are no errors that we’ve seen in PHP logs or New Relic logs. No exception is thrown.
Your Environment
- New Relic daemon version 9.17.0.300-adbdca64f20e
- PHP 7.4.7
- MySQL 5.7.33
- Amazon Linux release 2
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 17 (8 by maintainers)
We had this problem with 9.17.0.300, and it’s now fixed for us too with 9.17.1.301 on Ubuntu 20.04, tested both with Ubuntu’s PHP 7.4.3, and with Ondrej’s PHP 7.4.16.
Thanks @kneitinger - the issue seems to be fixed for us, though we’ll leave it on our testing server for a day or so before we start using it in production again.
We’re running Amazon Linux 2, but using the following RPM: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
Sure thing. I will just wait overnight and see what happens
On Wed, Apr 28, 2021 at 5:53 PM Kyle Kneitinger @.***> wrote:
–
Chris Muench Owner PHP Point Of Sale, LLC https://www.phppointofsale.com Direct +1 585-880-6599
Want cheaper and better Credit Card Processing? Checkout CardConnect! https://cardconnect.com/signup/php-pos
Love PHP POS? Signup for our reseller program https://phppointofsale.com/resellers.php and get paid to recommend us!
Want to improve PHP POS? Leave Feedback and vote on other requests! https://feedback.phppointofsale.com/
Hi all,
We just put out a patch release (9.17.1) that addresses this issue! We’ll leave this issue open for a few days to verify that this solution is working well for folks, so please feel free to leave any feedback about your experience! Thanks!