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