You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Therefore, a CR_MALFORMED_PACKET error is output when an CR_SERVER_GONE_ERROR error should be output.
Fatal error: Uncaught mysqli_sql_exception: Malformed packet in /var/www/html/test/test.php:11
I get the following error message in the same situation when building with libmysqlclient :
Fatal error: Uncaught mysqli_sql_exception: Lost connection to MySQL server during query in /var/www/html/test/test.php:11
The code to reproduce:
<?php$driver = new mysqli_driver();
$driver->report_mode = MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT;
$mysqli = new mysqli("mysql", "root", "", "test"); // my env
fgets(STDIN);
// Restarted mysql, then press enter
var_dump($mysqli->select_db("test2"));
PHP Version
PHP 8.0+
Operating System
No response
The text was updated successfully, but these errors were encountered:
Description
This is an issue I noticed while working on this fix.
#11912
This line sets the
CR_MALFORMED_PACKET
error.php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
Line 2471 in f907a00
However, the
CR_SERVER_GONE_ERROR
error may already be set at this point.php-src/ext/mysqlnd/mysqlnd_wireprotocol.c
Line 297 in f907a00
Therefore, a
CR_MALFORMED_PACKET
error is output when anCR_SERVER_GONE_ERROR
error should be output.I get the following error message in the same situation when building with libmysqlclient :
The code to reproduce:
PHP Version
PHP 8.0+
Operating System
No response
The text was updated successfully, but these errors were encountered: