From 8513bc0646b9eec6b321f76fabf2842af314a3ef Mon Sep 17 00:00:00 2001 From: Gagan Goel Date: Mon, 9 Sep 2019 23:33:46 -0400 Subject: [PATCH] Right trim whitespaces for a string ConstantColumn in a where clause --- dbcon/mysql/ha_calpont_execplan.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index 1aa9b1dfc..0822123ee 100644 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -5164,6 +5164,10 @@ void gp_walk(const Item* item, void* arg) cval.assign(str->ptr(), str->length()); } + // Trim the trailing white space from the constant + // string value in the where clause + boost::algorithm::trim_right(cval); + gwip->rcWorkStack.push(new ConstantColumn(cval)); (dynamic_cast(gwip->rcWorkStack.top()))->timeZone(gwip->thd->variables.time_zone->get_name()->ptr()); break;