From 18de7a0837597405dd84425d5937461349175295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 21 May 2021 13:51:04 +0200 Subject: [PATCH 1/2] Added default initialization for 'Query_Info' fields 'start_time' and 'end_time' #3458 --- lib/MySQL_Session.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 2a912b229c..67fdcb1577 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -212,6 +212,8 @@ Query_Info::Query_Info() { waiting_since = 0; affected_rows=0; rows_sent=0; + start_time=0; + end_time=0; } Query_Info::~Query_Info() { From fa58bc4e6af2e2acfbd145fbe91037475de896e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 21 May 2021 13:54:46 +0200 Subject: [PATCH 2/2] Fixed undefined behavior for some non-void functions in 'test_ps_no_store-t' not returning --- test/tap/tests/test_ps_no_store-t.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/tap/tests/test_ps_no_store-t.cpp b/test/tap/tests/test_ps_no_store-t.cpp index 5b0ad91651..0aa76ddf4e 100644 --- a/test/tap/tests/test_ps_no_store-t.cpp +++ b/test/tap/tests/test_ps_no_store-t.cpp @@ -34,6 +34,7 @@ int select_config_file(MYSQL* mysql, std::string& resultset) { fprintf(stderr, "error\n"); } + return 0; } int restore_admin(MYSQL* mysqladmin) { @@ -41,6 +42,8 @@ int restore_admin(MYSQL* mysqladmin) { MYSQL_QUERY(mysqladmin, "load mysql query rules to runtime"); MYSQL_QUERY(mysqladmin, "load mysql servers from disk"); MYSQL_QUERY(mysqladmin, "load mysql servers to runtime"); + + return 0; } int main(int argc, char** argv) {