| 30340 | */ |
| 30341 | |
| 30342 | bool |
| 30343 | copy_funcs(Item **func_ptr, const THD *thd) |
| 30344 | { |
| 30345 | Item *func; |
| 30346 | for (; (func = *func_ptr) ; func_ptr++) |
| 30347 | { |
| 30348 | if (func->type() == Item::FUNC_ITEM && |
| 30349 | ((Item_func *) func)->with_window_func()) |
| 30350 | continue; |
| 30351 | func->save_in_result_field(1); |
| 30352 | /* |
| 30353 | Need to check the THD error state because Item::val_xxx() don't |
| 30354 | return error code, but can generate errors |
| 30355 | TODO: change it for a real status check when Item::val_xxx() |
| 30356 | are extended to return status code. |
| 30357 | */ |
| 30358 | if (unlikely(thd->is_error())) |
| 30359 | return TRUE; |
| 30360 | } |
| 30361 | return FALSE; |
| 30362 | } |
| 30363 | |
| 30364 | |
| 30365 | /** |
no test coverage detected