Hi all
I've created a table in mysql 4.1.12 and 5.0.9-beta-standard as follow

| manager_new | CREATE TABLE `manager_new` (
 `id` bigint(20) NOT NULL auto_increment,
 `id_from_hits` bigint(20) default NULL,
 `from_ip` varchar(15) default NULL,
 `pool` char(1) NOT NULL default 'n',
 `to_ip` varchar(15) default '',
 `lstupdate` date default NULL,
 `comment` varchar(50) default NULL,
`added_by` enum('yariv','eddie','lisman','sweiss','interface') default 'interface',
 `black_white` char(1) NOT NULL default 'B',
 PRIMARY KEY  (`id`),
 UNIQUE KEY `from_ip` (`from_ip`,`to_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1


The two tables are EMPTY ,where I try this insert in each version I get :

mysql 5

mysql> insert into manager_new (id_from_hits,from_ip,to_ip,lstupdate,comment) values (39,'192.115.52.5','92.115.52.5',now(),'added automatically');
ERROR 1062 (23000): Duplicate entry '192.118.68.5-192.118.68.5' for key 2

mysql 4

mysql> insert into manager_new (id_from_hits,from_ip,to_ip,lstupdate,comment) values (39,'192.115.52.5','192.115.52.5',now(),'added automatically');
Query OK, 1 row affected (0.00 sec)

Is there any change in the way that mysql 5 treats UNIQUE index?
or is it a bug?

Best regards

Yariv


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to