opt_sum_query finds max() by index, then above IF branch returns EOF because where condition is FALSE if skip the branch then result is correct.
opt_sum_query finds max() by index, then above IF branch returns EOF because where condition is FALSE if skip the branch then result is correct.