From 219f67d1623847cd6644013de7af95c1c64a5a91 Mon Sep 17 00:00:00 2001 From: benthompson15 Date: Thu, 16 Jul 2020 13:57:18 -0500 Subject: [PATCH] MCOL-4181: Possible setting of ci->stats.fUser to NULL causing crash. --- dbcon/mysql/ha_mcs_impl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index b462fd99d..5cab0cfa1 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -5041,7 +5041,14 @@ int ha_cs_impl_pushdown_init(mcs_handler_info* handler_info, TABLE* table) { ci->stats.reset(); // reset query stats ci->stats.setStartTime(); - ci->stats.fUser = thd->main_security_ctx.user; + if (thd->main_security_ctx.user) + { + ci->stats.fUser = thd->main_security_ctx.user; + } + else + { + ci->stats.fUser = ""; + } if (thd->main_security_ctx.host) ci->stats.fHost = thd->main_security_ctx.host;