• Sergey Glukhov's avatar
    Bug#47371 reference by same column name · c3114506
    Sergey Glukhov authored
    At the end of execution top level join execution
    we cleanup this join with true argument.
    It leads to underlying join cleanup(subquery) with true argument too
    and to tmp_table_param->field array cleanup which is required later.
    The problem is that Item_func_set_user_var does not set
    result_filed which leads to unnecessary repeated excution of subquery
    on final stage.
    The fix is to set result_field for Item_func_set_user_var.
    c3114506
count_distinct.test 3.6 KB