Skip to content

Commit f9b0ee0

Browse files
committed
MDEV-19838: followup, fix for PS & embedded
Use 9 byte (min length packet)
1 parent 2e5450a commit f9b0ee0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libmysqld/lib_sql.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
330330
static int emb_stmt_execute(MYSQL_STMT *stmt)
331331
{
332332
DBUG_ENTER("emb_stmt_execute");
333-
uchar header[5];
333+
uchar header[9];
334334
THD *thd;
335335
my_bool res;
336336

@@ -342,6 +342,7 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
342342

343343
int4store(header, stmt->stmt_id);
344344
header[4]= (uchar) stmt->flags;
345+
header[5]= header[6]= header[7]= header[8]= 0; // safety
345346
thd= (THD*)stmt->mysql->thd;
346347
thd->client_param_count= stmt->param_count;
347348
thd->client_params= stmt->params;

0 commit comments

Comments
 (0)