Bug #74290 [Opn->Fbk]: [mysqlnd] Annoying "mysqli::close(): Couldn't fetch mysqli" warning

From: Date: Fri, 05 May 2017 06:13:36 +0000
Subject: Bug #74290 [Opn->Fbk]: [mysqlnd] Annoying "mysqli::close(): Couldn't fetch mysqli" warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208956@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74290&edit=1 ID: 74290 Updated by: fjanisze@php.net Reported by: vedad at kajtaz dot net Summary: [mysqlnd] Annoying "mysqli::close(): Couldn't fetch mysqli" warning -Status: Open +Status: Feedback Type: Bug Package: MySQLi related Operating System: FreeBSD 10.1 PHP Version: 7.0.17 Block user comment: N Private report: N New Comment: Neither mysqli nor mysqlnd will raise a warning in case of missing OK_packet after a COM_QUIT (mysqli::close()) to the server, there must have been something else ongoing with the server during the COM_QUIT. The fact that "I'm not using a MySQL server, but a closed source MySQL proxy" let me think that you closed source version is working differently from the opensource MySQL server, thus it might not be compliant. From our perspective the server behavior is the ground on which we define what is an expected or non expected event. I had a peek at the server code and attempted to execute some test scenario with debug logging enabled, I dot even see the server sending the packet at all in my local setup and no warning is raised. Previous Comments: ------------------------------------------------------------------------ [2017-04-24 09:05:32] vedad at kajtaz dot net Hello, As stated in previous comments, the MySQL proxy in use is MySQL specification-compliant, and I believe the warning should be removed, as it doesn't report any unexpected/un-compliant behavior. What kind of additional feedback is needed? ------------------------------------------------------------------------ [2017-04-23 04:22:49] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2017-04-12 12:51:21] vedad at kajtaz dot net I'm not using a MySQL server, but a closed source MySQL proxy. I can provide a test access if necessary? ------------------------------------------------------------------------ [2017-04-10 08:29:36] fjanisze@php.net Can you provide some details on what server version you're using? ------------------------------------------------------------------------ [2017-03-22 13:22:49] vedad at kajtaz dot net Description: ------------ The following warning is generated by mysqlnd on mysqli::close() call when the server, upon receiving COM_QUIT, closes the connection instead of sending an OK_Packet: PHP Warning: mysqli::close(): Couldn't fetch mysqli in ... According to the MySQL spec, simply closing the connection is perfectly valid: https://dev.mysql.com/doc/internals/en/com-quit.html "response: either a connection close or a OK_Packet" Therefore, I believe this warning should be removed, as it does not report any unexpected behavior. One may overcome the issue using the @ operator, or disabling the error reporting for this specific call, but both the warning itself and the workarounds are a waste of CPU resources IMHO. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74290&edit=1

« previous php.bugs (#208956) next »