Bug #78879 LIKE and '<' should have same precedence according the document.
Submitted: 20 Oct 2015 6:23 Modified: 20 Oct 2015 13:02
Reporter: YYY YYy Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:5.6.23, 5.6.27, 5.5.47 OS:Linux
Assigned to: Assigned Account CPU Architecture:Any

[20 Oct 2015 6:23] YYY YYy
Description:
As http://dev.mysql.com/doc/refman/5.6/en/operator-precedence.html described,the operator '<' and 'LIKE' should have the same precedence,and they are  left associative according the source code :%left   EQ EQUAL_SYM GE GT_SYM LE LT NE IS LIKE REGEXP IN_SYM.
why the below sql should behaviors as if ‘ like’ has higher precedence than '<';

mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.23    |
+-----------+
1 row in set (0.00 sec)

mysql> SELECT (0 < 'David_') LIKE 'David_' ;
+------------------------------+
| (0 < 'David_') LIKE 'David_' |
+------------------------------+
|                            0 |
+------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> SELECT 0 < 'David_' LIKE 'David_' ;
+----------------------------+
| 0 < 'David_' LIKE 'David_' |
+----------------------------+
|                          1 |
+----------------------------+
1 row in set (0.00 sec)

How to repeat:
mysql> select version();
+-----------+
| version() |
+-----------+
| 5.6.23    |
+-----------+
1 row in set (0.00 sec)

mysql> SELECT (0 < 'David_') LIKE 'David_' ;
+------------------------------+
| (0 < 'David_') LIKE 'David_' |
+------------------------------+
|                            0 |
+------------------------------+
1 row in set, 1 warning (0.00 sec)

mysql> SELECT 0 < 'David_' LIKE 'David_' ;
+----------------------------+
| 0 < 'David_' LIKE 'David_' |
+----------------------------+
|                          1 |
+----------------------------+
1 row in set (0.00 sec)
[20 Oct 2015 13:02] MySQL Verification Team
Hello!

Thank you for the bug report.

Thanks,
Umesh
[20 Oct 2015 13:26] MySQL Verification Team
Also, see related Bug #78886
[28 Nov 2019 8:16] Gleb Shchepa
Thank you for the bug report.

Recommended workaround until the fix: please add parentheses.