Bug #4340 find_in_set is case insensitive even on binary operators
Submitted: 30 Jun 2004 12:04 Modified: 24 Aug 2004 19:08
Reporter: Daniel Treplin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.17 OS:Linux (Linux)
Assigned to: Sergei Glukhov CPU Architecture:Any

[30 Jun 2004 12:04] Daniel Treplin
Description:

The following statement should return 0, I suppose:

mysql> select find_in_set(binary 'a',binary 'A,B,C');
+----------------------------------------+
| find_in_set(binary 'a',binary 'A,B,C') |
+----------------------------------------+
|                                      1 |
+----------------------------------------+
1 row in set (0.01 sec)

How to repeat:
obvious

Suggested fix:
find_in_set should operate case sensitive, if one of the operators is binary.
[30 Jun 2004 18:26] Dean Ellis
Verified against 4.0.21 and 4.1.3.  It is case-insensitive even when using binary collations with SET columns in 4.1.
[24 Aug 2004 13:35] Sergei Glukhov
ChangeSet
  1.1985 04/08/24
  Fix from bug #4340: find_in_set is case insensitive even on binary operators
[24 Aug 2004 17:16] Sergei Glukhov
Fixed in 4.0 source tree, patch for 4.1 is sent for review
[24 Aug 2004 19:08] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

fixed in 4.0.21, 4.1.4