Bug #86059 LIKE not behaving as documented
Submitted: 24 Apr 2017 20:22 Modified: 8 Jun 2017 15:22
Reporter: CJ Trowbridge Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.17 OS:Debian (8.7)
Assigned to: CPU Architecture:Any
Tags: like

[24 Apr 2017 20:22] CJ Trowbridge
Description:
String literal wildcards in LIKE statements do not work unless they are after the LIKE.

This could lead to incorrect results in select statements or joins.

How to repeat:
These work;
'Term' LIKE `Column`
`Column` LIKE 'Term'
`Column` LIKE '%Term%'

This does not work;
'%Term%' LIKE `Column`

Suggested fix:
The wildcards should be handled the same in strings on both sides of the LIKE statement, since string literals work on both sides.
[8 May 2017 15:22] MySQL Verification Team
Hi!

Thank you for your bug report.

I am unable to find a text in our 5.7 manual that explicitly states that left argument can have wildcards.

Would you be so kind to let me know the exact chapter number in the format XX.YY.ZZ.WW ...

Thanks in advance.
[9 Jun 2017 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".