3 messages in com.mysql.lists.mysqlRecord exists but not found - grrr
FromSent OnAttachments
Wenca27 Oct 2005 02:55 
Jigal van Hemert27 Oct 2005 03:30 
Wenca27 Oct 2005 03:43 
Subject:Record exists but not found - grrr
From:Wenca (wen@dovolenou.cz)
Date:10/27/2005 02:55:09 AM
List:com.mysql.lists.mysql

Hi all,

I've got a problem that I don't understand and that is driving me mad.

I have a table 'tab_p' with this structure:

name type

--------------------------------------- p_id mediumint(8) AUTOINCREMENT NOT NULL PRIMARY KEY d_id smallint(5) NOT NULL name varchar(50) NOT NULL

And unique index on (d_id, name).

ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_slovak_ci or utf8_czech_ci

And there is a row with (for example) these data: p_id d_id name

------------------------ 953 20602 Machico

When I try query: SELECT * FROM tab_p WHERE d_id = 20602 AND name LIKE 'Machico' -> no results

So I try to insert the row: INSERT INTO tab_p (d_id, name) VALUES (20602, 'Machico') -> Error: #1062 - Duplicate entry '20602-Machico' for key 2

Why!!!???

There are thousands of records in the table an they work fine but then there occures some normal word (even with no special characters) and it behaves like this.

Can anyone help me?

I'm running MySQL 4.1.11 on Linux.