To be executed correctly execution should avoid following if branch in JOIN::exec
if (!tables_list && (tables || !select_lex->with_sum_func))
To be executed correctly execution should avoid following if branch in JOIN::exec
if (!tables_list && (tables || !select_ lex->with_ sum_func) )