From 6090c0e6183d20f95b30ff25674bd54721cb93d1 Mon Sep 17 00:00:00 2001 From: David Hall Date: Tue, 8 Mar 2016 16:46:35 -0600 Subject: [PATCH] Reverse loop must still account for 0 based array --- dbcon/mysql/ha_calpont_execplan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index 7ca051705..276733c1e 100755 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -2545,7 +2545,7 @@ ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& non else // where clause { stack tmpPtStack; - for (int32_t i = ifp->argument_count(); i>0; i--) + for (int32_t i = ifp->argument_count()-1; i>=0; i--) { if (isPredicateFunction((ifp->arguments()[i]), &gwi) && !gwi.ptWorkStack.empty()) {