Details
Description
Item_func_nullif does this trick:
// Put "a" to args[0] for comparison and to args[2] for the returned value.
Item_func_nullif(THD *thd, Item *a, Item *b):
Item_func_hybrid_field_type(thd, a, b, a)
{}
to emulate CASE WHEN a=b THEN NULL ELSE a END
It seems to work fine, but needs theoretical proves that it's OK to do this way.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions