Notes
This section provides a collection of miscellaneous notes on MySQL
Native Driver usage.
In the case where you pass a statement to
mysqli_query that is longer than
max_allowed_packet of the server, the returned
error codes are different depending on whether you are using MySQL
Native Driver (mysqlnd) or MySQL Client Library
(libmysql). The behavior is as follows:
mysqlnd on Linux returns an error code of 1153.
The error message means got a packet bigger than
max_allowed_packet bytes
.
mysqlnd on Windows returns an error code 2006.
This error message means server has gone away
.
libmysql on all platforms returns an error code
2006. This error message means server has gone
away
.
The same thing happens with
mysqli_stmt_prepare.