Skip to content

Commit e939ea5

Browse files
committed
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
1 parent 6d46c97 commit e939ea5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

storage/connect/ha_connect.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,9 +2486,6 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
24862486
if (!i && (ismul))
24872487
return NULL;
24882488

2489-
if ((res= pval->val_str(&tmp)) == NULL)
2490-
return NULL; // To be clarified
2491-
24922489
switch (args[i]->real_type()) {
24932490
case COND::STRING_ITEM:
24942491
pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length());
@@ -2520,7 +2517,11 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
25202517
return NULL;
25212518
} // endswitch type
25222519

2523-
if (trace)
2520+
// This was moved because cannot be done for FUNC_ITEM
2521+
if ((res= pval->val_str(&tmp)) == NULL)
2522+
return NULL; // To be clarified
2523+
2524+
if (trace)
25242525
htrc("Value=%.*s\n", res->length(), res->ptr());
25252526

25262527
// Append the value to the argument list

0 commit comments

Comments
 (0)