Bug #10904 Illegal mix of collations between a system variable and a constant
Submitted: 27 May 2005 7:54 Modified: 23 Jun 2005 12:30
Reporter: Alexander Barkov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.12 OS:
Assigned to: Alexander Barkov CPU Architecture:Any

[27 May 2005 7:54] Alexander Barkov
Description:
LIKE between a constant and function version() works fine,
however between a constant and variable @@version fails,
although version() and @@version return the same result.

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

mysql> select @@version like '%4.1%';
ERROR 1267: Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation 'like'

Suggested fix:
Treat all system variables as having SYSVAR coercibility,
like functions VERSION(), USER() and DATABASE() do.
[2 Jun 2005 11:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25509
[2 Jun 2005 18:09] Alexander Barkov
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.1.13
[23 Jun 2005 12:30] Jon Stephens
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:

Documented in 4.1.13 changelog; marked Closed.