From 890846fa8ac86ce2d14920c7bc9729c6312a857d Mon Sep 17 00:00:00 2001 From: David Hall Date: Fri, 4 Sep 2020 16:31:20 -0500 Subject: [PATCH] MCOL-3464 don't dereference a NULL String. --- dbcon/mysql/ha_mcs_execplan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index 1abed2c99..e32172ed4 100755 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -4386,7 +4386,8 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) bool isInformationSchema = false; // @bug5523 - if (ifp->cached_table && strcmp(ifp->cached_table->db.str, "information_schema") == 0) + if (ifp->cached_table && ifp->cached_table->db.length > 0 + && strcmp(ifp->cached_table->db.str, "information_schema") == 0) isInformationSchema = true; // support FRPM subquery. columns from the derived table has no definition