summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-11-02 12:49:19 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-11-02 12:49:19 +0200
commit09a1f0075a8d5752dd7b2940a20d86a040af1741 (patch)
tree42c96cf95d5df2950b77329c76c0024f33088aff /libmysqld
parente6f95b23f425001a14a528256354e0faf4e272f6 (diff)
parent440d4b282dd4992d64abdd6289859598db7e5f75 (diff)
downloadmariadb-git-09a1f0075a8d5752dd7b2940a20d86a040af1741.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/CMakeLists.txt2
-rw-r--r--libmysqld/lib_sql.cc3
2 files changed, 3 insertions, 2 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 213238b6dbf..d2f7d40c1b4 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -159,7 +159,7 @@ ENDIF()
SET(LIBS
dbug strings mysys mysys_ssl pcre2-8 vio
${ZLIB_LIBRARY} ${SSL_LIBRARIES}
- ${LIBWRAP} ${LIBCRYPT} ${LIBDL}
+ ${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS}
${EMBEDDED_PLUGIN_LIBS}
sql_embedded
)
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 21227e78a39..b1a467db3c6 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -332,7 +332,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;
@@ -344,6 +344,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;