• Alexander Barkov's avatar
    MDEV-9712 Performance degradation of nested NULLIF · a87507ee
    Alexander Barkov authored
    10.1 introduced a problem:
    Execution time for various recursive stages
    (walk, update_used_table, and propagate_equal_fields)
    in NULLIF is O(recursion_level^2), because complexity is
    doubled on every recursion level when we copy args[0] to args[2].
    
    This change fixes to avoid unnecessary recursion in:
    - Item_func_nullif::walk
    - Item_func_nullif::update_used_tables
    - Item_func_nullif::propagate_equal_fields
    when possible.
    a87507ee
item_cmpfunc.cc 182 KB