Non-ASCII tablename not converted to lowercase in FK references
Posted by:
David Balažic ()
Date: November 07, 2006 08:57AM
Hi!
First, sorry if I post in the wrong forum category, I'm new here.
I noticed this problem :
alter table table1 add constraint FKB48269E285EFD5D4 foreign key (f_id) references BAR (id);
If the name BAR contains non-ascii uppercase characters, then the command fails with errno 150.
Example :
create table one (mid bigint not null, primary key (mid));
create table twoš (id bigint not null auto_increment, stevilka varchar(255), primary key (id));
alter table one add index FKB48269E285EFD5D4 (mid),
add constraint FKB48269E285EFD5D4 foreign key (mid) references twoŠ (id);
This fails, while "... references TWoš (id);" would work.
So it converts ASCII chars to lowercase correctly, while non-ascii chars are not converted.
Note that in other commands both ascii and non-ascii are correctly converterd like :
- create table xŠy ... creates table with name "xšy" (all 3 lower case)
- alter table abcŠ ... alters the table "abcš" with no error
I observed this problem with :
- 4.1.21-community-nt
- 5.0.27 (community, win32)
5.1.12-beta win32 does NOT have this problem any more.
My settings (install procedure):
- install MySQL-5.1/mysql-essential-5.1.12-beta-win32.msi
- Typical install
- detailed configuration
- developer machine
- transactional Database Only (e.g. InnoDB is default)
- DSS/OLAP
- Enable TCP/IP ; Enable Strict Mode
- Best support for Multilingualism
As the problem is fioxed in the latest beta, I wonder if it is worth submitting a bug ? So that 5.0.x is fixed in the nex release/patch ?
NOTE: Try the examples with an Unicode aware UI, otherwise it might choke on the non-ascii chars. I used MySQL Query Browser 5.0 on Windows XP.
Regards,
David
PS: How do other DBs behave in this regard ?
Edited 1 time(s). Last edit at 11/07/2006 08:58AM by David Balažic.
Sorry, you can't reply to this topic. It has been closed.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.