Kern Sibbald wrote:
Hello,

It looks to me like MySQL 4.0 has changed the way they deal with indexing and keys since version 3.23.51. It appears as if they are using *only* the index to decide if the key is unique or not. The index was setup on the first 50 characters of the path. Previously, the index was used for indexing only and not to determine uniqueness.

I don't think it has anything to do with the INDEX length. See following:

mysql> insert into Path(Path) values ('C:/$VAULT$.AVG/');
ERROR 1062: Duplicate entry '47946' for key 1
mysql> describe Path;
+--------+------------------+------+-----+---------+----------------+
| Field  | Type             | Null | Key | Default | Extra          |
+--------+------------------+------+-----+---------+----------------+
| PathId | int(10) unsigned |      | PRI | NULL    | auto_increment |
| Path   | blob             |      | MUL |         |                |
+--------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)

mysql> insert into Path(PathId,Path) values (47947,'C:/$VAULT$.AVG/');
ERROR 1062: Duplicate entry '47947' for key 1
mysql> insert into Path(PathId,Path) values (47948,'Z:/$VAULT$.AVG/');
ERROR 1062: Duplicate entry '47948' for key 1
mysql> insert into Path(Path) values (' ');
ERROR 1062: Duplicate entry '47946' for key 1
mysql> replace into Path(PathId,Path) values (47947,'C:/$VAULT$.AVG/');
ERROR 1062: Duplicate entry '47947' for key 1
mysql> update Path set Path='BOGUS PATH' where PathID=47947;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0
mysql>


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to