List:General Discussion« Previous MessageNext Message »
From:zaschke Date:April 13 1999 1:07pm
Subject:Bug in UNIQUE column?
View as plain text  
>Description:
After creating a table with one unique column and inserting three rows where
the first and the second one start with one lower letter and the third row
starts with the same but upper letter, isamchk raises an error on index

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

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

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

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

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


Then run isamchk on this table:

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

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

>Submitter-Id:	<submitter ID>
>Originator:	Michal Zaschke
>Organization:
 Ing. Michal Zaschke
   provozni technik
Sokolovska uhelna, a.s.
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:

System: Linux ester.suas.cz 2.0.35 #12 Tue Jul 14 14:16:52 CEST 1998 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS='-static'

Perl: This is perl, version 5.004_04 built for i386-linux

glibc version 2.0.7-19
Character set: czech
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