Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Cannot Reproduce
-
1.4.4
-
None
-
centos6.5 maxscale1.4.4 php7(laravel) mysql5.6.27
Description
We found error in the production environment using maxscale 1.4.4 php project, the error is as follows:
[2017-03-21 11:47:57] production.ERROR: ErrorException: Wrong COM_STMT_PREPARE response size. Received 7 in /data1/web/redbox2/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php:333
Line 333 is as follows:
$statement = $this->getPdoForSelect($useReadPdo)->prepare($query);
We are not sure the pass sql have not set name and other operations,we find this souce code:
http://home.iitk.ac.in/~kanishk/php-5.6.12-src/ext/mysqlnd/mysqlnd_wireprotocol.c
/* 1 + 4 (id) + 2 (field_c) + 2 (param_c) + 1 (filler) + 2 (warnings ) */
#define PREPARE_RESPONSE_SIZE_41 9
#define PREPARE_RESPONSE_SIZE_50 12
....
if (data_size != PREPARE_RESPONSE_SIZE_41 &&
data_size != PREPARE_RESPONSE_SIZE_50 &&
!(data_size > PREPARE_RESPONSE_SIZE_50))
if we want to know
DBG_INF_FMT("Prepare packet read: stmt_id=%u fields=%u params=%u",
packet->stmt_id, packet->field_count, packet->param_count);
The code must be recompiled,
so,How can we avoid this problem,thanks