edit: I filed MySQL bug#46867 about this issue.
Ask anyone who has learned to count the following two questions.
The answer to both of which should be yes.
Q:Is 5 between 1 and 10? A: Yes
Q:Is 5 between 10 and 1? A: Yes
Ask MySQL those same questions:
mysql> (select 'Yes' from dual where 5 between 1 and 10 ) union (select 'No' ) limit 1; +-----+ | Yes | +-----+ | Yes | +-----+ 1 row in set (0.00 sec) mysql> (select 'Yes' from dual where 5 between 10 and 1 ) union (select 'No') limit 1; +-----+ | Yes | +-----+ | No | +-----+ 1 row in set (0.00 sec)
This is a problem because applications may produce BETWEEN
clauses. I don't think most …