List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:April 13 1999 9:10pm
Subject:Bug in UNIQUE column?
View as plain text  
>>>>> "zaschke" == zaschke  <zaschke@stripped> writes:

>> Description:
zaschke> After creating a table with one unique column and inserting three rows where
zaschke> the first and the second one start with one lower letter and the third row
zaschke> starts with the same but upper letter, isamchk raises an error on index

>> How-To-Repeat:
zaschke> Create table groups and insert three rows:

mysql> CREATE TABLE groups (
-> name varchar(30) DEFAULT '' NOT NULL,
-> UNIQUE name (name)
-> );
zaschke> Query OK, 0 rows affected (0.16 sec)

mysql> INSERT into groups (name) VALUES ('s');
zaschke> Query OK, 1 row affected (0.03 sec)

mysql> INSERT into groups (name) VALUES ('s1');
zaschke> Query OK, 1 row affected (0.00 sec)

mysql> INSERT into groups (name) VALUES ('Sc');
zaschke> Query OK, 1 row affected (0.00 sec)


zaschke> Then run isamchk on this table:

zaschke> [zaschke@rebeka tmp]$ isamchk -e /usr/local/var/test/groups
zaschke> Checking ISAM file: /usr/local/var/test/groups
zaschke> Data records:       3   Deleted blocks:       0
zaschke> - check file-size
zaschke> - check delete-chain
zaschke> - check index reference
zaschke> - check records and index references
zaschke> isamchk: error: Record at:         20  Can't find key for index:  1
zaschke> ISAM-table '/usr/local/var/test/groups' is corrupted
zaschke> Fix it using switch "-r" or "-o"

>> Fix:
zaschke> It is possible to repair the index but after any next inserting the index
zaschke> corrupts again

>> Submitter-Id:	<submitter ID>
>> Originator:	Michal Zaschke
>> Organization:
zaschke>  Ing. Michal Zaschke
zaschke>    provozni technik
zaschke> Sokolovska uhelna, a.s.
zaschke> mailto:zaschke@stripped
>> 
>> MySQL support: none
>> Synopsis:	index crashes with unique column
>> Severity:	serious
>> Priority:	medium
>> Category:	mysql
>> Class:		sw-bug
>> Release:	mysql-3.21.33 (Source distribution)

>> Environment:

<cut>

Hi!

The above may happen if you have compiled MySQL 3.21.33 with czech
sorting!

Many (but probably not all) sorting bugs with czech sorting is fixed
in the newest MySQL 3.22 version!

Regards,
Monty
Thread
Bug in UNIQUE column?zaschke13 Apr
  • Re: Bug in UNIQUE column?Michal Zaschke13 Apr
  • Bug in UNIQUE column?Michael Widenius14 Apr
  • Re: Bug in UNIQUE column?Michal Zaschke14 Apr