Bug #2451 ALTER doesn't result in an error on CHARACTER SET and COLLATION conflict
Submitted: 19 Jan 2004 23:09 Modified: 27 Aug 2004 17:27
Reporter: Alexander Barkov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.2 OS:
Assigned to: Alexander Barkov CPU Architecture:Any

[19 Jan 2004 23:09] Alexander Barkov
Description:
> Paul wrote:
> I was surprised that this statement didn't result in an error,
> because the CHARACTER SET and COLLATE values conflict.
> 
> mysql> alter database cookbook collate latin2_general_ci character set 
> latin1;
> Query OK, 1 row affected (0.00 sec)
> 
> The resulting db.opt file was:
> 
> default-character-set=latin1
> default-collation=latin1_swedish_ci

How to repeat:
Run the above.
[22 Jan 2004 4:35] Alexander Barkov
The same happens with CREATE TABLE:

create table a (a char) collate latin1_german2_ci character set latin2;
[27 Aug 2004 17:27] 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 both DATABASE and TABLE contexs.