I am using mySQL 3.22.4a-beta
yes, I know its old :-(

I have just stumbled across a problem with how it
treats 'uniqueness' in table contents.

I have a table with a column defined as:

  create table test (name varchar(80) not null);
  alter table test ADD UNIQUE (name), ADD INDEX (name);

When I now add entries that are case sensitive, I get duplicate entry errors:

mysql> insert into test (name) values ('a');
Query OK, 1 row affected (0.04 sec)

mysql> insert into test (name) values ('A');
ERROR 1062: Duplicate entry 'A' for key 1


I always considered the value of 'a' and 'A' to be unique,
but this version of mySQL doesn't appear to, at least with
indexes.

Can anyone either point out what I am doing wrong, or a workaround?

TIA
Fulko


-------------------------------------------------------------------------------
Fulko Hew,                           Voice:  905-681-5570
Senior Engineering Designer,         Fax:    905-681-5556
SITA (Burlington)                    Email:  [EMAIL PROTECTED]
777 Walkers Line,
Burlington, Ontario, Canada, L7N 2G1

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to