Bug #38697 utf8_general_cs cannot be used with Windows?
Submitted: 10 Aug 2008 10:53 Modified: 21 Mar 2011 19:25
Reporter: kenichi yonekawa Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.1.25, 5.1.26, 5.1.31 OS:Windows
Assigned to: Hery Ramilison CPU Architecture:Any
Tags: collation, Contribution, windows

[10 Aug 2008 10:53] kenichi yonekawa
Description:
I can't used utf8_general_cs collation with Windows.

 mysql> use test
 Database changed
 mysql> CREATE TABLE t( a int, b varchar(10) )ENGINE=INNODB DEFAULT CHARSET=utf8 COLLATE=utf8_general_cs;
 ERROR 1273 (HY000): Unknown collation: 'utf8_general_cs'

Because, Windows configure.js script doesn't define HAVE_UTF8_GENERAL_CS macro.
In Linux, the macro is defined by configure( using default_collation=utf8_general_cs )
Windows configure.js scripts doesn't define it.

The option to define the macro named CYBOZU exists. 
However, the CYBOZU macro is not used on the source. 

How to repeat:
I builded it as shown in this page.
http://dev.mysql.com/doc/refman/5.1/en/windows-source-build-cmake.html

Suggested fix:
if using CYBOZU macro,

--- mysql-5.1.25-rc/CMakeLists.txt	2008-05-28 13:35:34.000000000 +0900
+++ mysql-5.1.25-rc.new/CMakeLists.txt	2008-07-22 13:58:35.000000000 +0900
@@ -96,6 +96,7 @@
 ENDIF(__NT__)
 IF(CYBOZU)
   ADD_DEFINITIONS(-DCYBOZU)
+  ADD_DEFINITIONS(-DHAVE_UTF8_GENERAL_CS)
 ENDIF(CYBOZU)

or adding option for define HAVE_UTF8_GENERAL_CS to configure.js.
[10 Aug 2008 17:14] Valeriy Kravchuk
Thank you for a problem report. Verified just as descibed with 5.1.26-rc:

C:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -proot -P3310 test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.26-rc-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> drop table t;
Query OK, 0 rows affected (0.20 sec)

mysql> CREATE TABLE t( a int, b varchar(10) )ENGINE=INNODB DEFAULT CHARSET=utf8
    -> COLLATE=utf8_general_cs;
ERROR 1273 (HY000): Unknown collation: 'utf8_general_cs'
[3 Feb 2009 17:41] Valeriy Kravchuk
This collation is still not present in official binaries.
[17 Jun 2009 21:09] Liz Drachnik
HI Kenichi

In order for us to continue the process of reviewing your  contribution to MySQL -  Please review and sign the Sun|MySQL contributor agreement (the "SCA")

The process is explained here: 
http://forge.mysql.com/wiki/Sun_Contributor_Agreement

Thank you in advance! 

Liz Drachnik
Program Manager - MySQL
[3 Oct 2009 23: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".
[21 Mar 2011 19:25] Hery Ramilison
Committed revision 3623.