[MXS-1201] maxscale 1.4.4 prepare php7 laravel Created: 2017-03-23  Updated: 2017-08-09  Resolved: 2017-08-09

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.4.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: hongyang Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

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))

{ DBG_ERR_FMT("Wrong COM_STMT_PREPARE response size. Received %u", data_size); php_error(E_WARNING, "Wrong COM_STMT_PREPARE response size. Received %u", data_size); DBG_RETURN(FAIL); }

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



 Comments   
Comment by markus makela [ 2017-08-09 ]

We have not been able to reproduce this. I would suggest trying a newer version of MaxScale.

Generated at Thu Feb 08 04:04:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.