summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-10-29 22:19:32 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-10-29 22:19:32 +0100
commitf9b0ee07ef066625403ef64bf3486c2db7baed10 (patch)
tree50d3ac3609a0b6e7e2de338e61904de4dfc93c9f
parent2e5450af052040848042c6eae4f03efa23c5f8fc (diff)
downloadmariadb-git-f9b0ee07ef066625403ef64bf3486c2db7baed10.tar.gz
MDEV-19838: followup, fix for PS & embedded
Use 9 byte (min length packet)
-rw-r--r--libmysqld/lib_sql.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index d278bd39834..229e4e69e6a 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -330,7 +330,7 @@ static my_bool emb_read_query_result(MYSQL *mysql)
static int emb_stmt_execute(MYSQL_STMT *stmt)
{
DBUG_ENTER("emb_stmt_execute");
- uchar header[5];
+ uchar header[9];
THD *thd;
my_bool res;
@@ -342,6 +342,7 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
int4store(header, stmt->stmt_id);
header[4]= (uchar) stmt->flags;
+ header[5]= header[6]= header[7]= header[8]= 0; // safety
thd= (THD*)stmt->mysql->thd;
thd->client_param_count= stmt->param_count;
thd->client_params= stmt->params;