[Commits] d071e75: MDEV-18431: Select max + row_number giving incorrect result