From e939ea58e511e7a3cca315923188fda2cfd7477b Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Wed, 9 Sep 2015 01:26:00 +0200 Subject: [PATCH] Fix assert error for where clause with UDF's was fixed in HA_CONNECT::CondFilter moving pval->val_str(&tmp) modified: storage/connect/ha_connect.cc --- storage/connect/ha_connect.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 007b2428094a6..c502493357eb9 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -2486,9 +2486,6 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) if (!i && (ismul)) return NULL; - if ((res= pval->val_str(&tmp)) == NULL) - return NULL; // To be clarified - switch (args[i]->real_type()) { case COND::STRING_ITEM: pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length()); @@ -2520,7 +2517,11 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) return NULL; } // endswitch type - if (trace) + // This was moved because cannot be done for FUNC_ITEM + if ((res= pval->val_str(&tmp)) == NULL) + return NULL; // To be clarified + + if (trace) htrc("Value=%.*s\n", res->length(), res->ptr()); // Append the value to the argument list