From 8a2ffdb7f223c3eb9736dd6609dcc2fad5536cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 9 Feb 2018 02:50:26 +0100 Subject: [PATCH] MyComQueryCmd not initialized could cause crash #1370 This happens for prepared statements, and mysql-query_digests=false --- lib/MySQL_PreparedStatement.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/MySQL_PreparedStatement.cpp b/lib/MySQL_PreparedStatement.cpp index b7c998012..22bbb5ef5 100644 --- a/lib/MySQL_PreparedStatement.cpp +++ b/lib/MySQL_PreparedStatement.cpp @@ -148,6 +148,7 @@ MySQL_STMT_Global_info::MySQL_STMT_Global_info(uint64_t id, unsigned int h, memcpy(query, q, ql); query[ql] = '\0'; // add NULL byte query_length = ql; + MyComQueryCmd = MYSQL_COM_QUERY__UNINITIALIZED; num_params = stmt->param_count; num_columns = stmt->field_count; warning_count = stmt->upsert_status.warning_count;