Hey,

I am trying to create an index on a varchar column, but I am getting a
suspicious error I am unable to overcome.

Indeed there are duplicated rows but since there is no constraint nor a
key in the table, I do not see why this error is generated.

I would appreciate some help.

Here are the details.

mysql> create index url_site_idx on URL(Site(255));
ERROR 1062: Duplicate entry 'Transmeta unveils futuristic Crusoe chip ' 
for key 1
mysql>

mysql> select version();
+-----------------+
| version()       |
+-----------------+
| 4.0.17-standard |
+-----------------+
1 row in set (0.00 sec)

mysql> show create table URL;
+-------+---------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------+
| Table | Create Table

                    |
+-------+---------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------+
| URL   | CREATE TABLE `URL` (
  `Parent` text,
  `URL` text,
  `Site` text,
  `Description` text,
  `Topsite` int(11) default NULL,
  `Star` tinyint(1) default NULL
) TYPE=MyISAM |
+-------+---------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------+
1 row in set (0.00 sec)

mysql> describe URL;
+-------------+------------+------+-----+---------+-------+
| Field       | Type       | Null | Key | Default | Extra |
+-------------+------------+------+-----+---------+-------+
| Parent      | text       | YES  |     | NULL    |       |
| URL         | text       | YES  |     | NULL    |       |
| Site        | text       | YES  |     | NULL    |       |
| Description | text       | YES  |     | NULL    |       |
| Topsite     | int(11)    | YES  |     | NULL    |       |
| Star        | tinyint(1) | YES  |     | NULL    |       |
+-------------+------------+------+-----+---------+-------+
6 rows in set (0.00 sec)

## no indexes at all currently
mysql> show index from URL;
Empty set (0.00 sec)

Thanks.
Eli Shemer.
Siteware.



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

Reply via email to