diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index e365398127a..2d98a7b8391 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -215,7 +215,8 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { Item *item; /* We can't yet set item to *arg as fix_fields may change *arg */ - if ((*arg)->fix_fields(thd, tables, arg) || + /* We shouldn't call fix_fields() twice, so check 'fixed' field first */ + if ((!(*arg)->fixed && (*arg)->fix_fields(thd, tables, arg)) || (*arg)->check_cols(allowed_arg_cols)) return 1; /* purecov: inspected */ item= *arg; |