Finally I was able to produce a complete step-by-step to corrupt the index
;-)

Do the following in the mySQL console (with e.g. a fresh and empty table):


mysql> insert into visitkort (kategori_id) values (108);
Query OK, 1 row affected (0.01 sec)

mysql> select last_insert_id();
+------------------+
| last_insert_id() |
+------------------+
|                1 |
+------------------+
1 row in set (0.00 sec)

mysql> update visitkort set navn = 'test5' where id = 1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> update visitkort set tekst1 = 'bla bla' where id = 1;
ERROR 1034: Incorrect key file for table: 'visitkort'. Try to repair it


After this, myisamchk reports the following:

D:\mysql\data\test>myisamchk --extend-check visitkort
Checking MyISAM file: visitkort
Data records:       1   Deleted blocks:       0
myisamchk: warning: Table is marked as crashed
myisamchk: warning: 1 clients is using or hasn't closed the table properly
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1
- check data record references index: 2
- check data record references index: 3
- check data record references index: 4
- check data record references index: 5
- check data record references index: 6
- check records and index references
MyISAM-table 'visitkort' is usable but should be fixed


I guess this isn't the expected behavior of mySQL ;-)

It should be noted, that the above behavior does not occur if I drop the
FULLTEXT index. Without this index, the errors are gone and table works
fine. I've also tried to remove all other indexes except the FULLTEXT and
the primary key, and the error is still there. So it is definitely a problem
within the FULLTEXT index.

- Carsten


----- Original Message -----
From: "Sergei Golubchik" <[EMAIL PROTECTED]>
To: "Carsten Gehling" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 6:26 PM
Subject: Re: Bug report: FULLTEXT index corrupts the index with too many
TEXT fields


> Hi!
>
> On Jul 16, Carsten Gehling wrote:
> > Description:
> > A specific table (see "How-To-Repeat) with a FULLTEXT index causes
errors in
> > the MYI file when inserting new rows.
> >
> > 1) Create the following table:
> > CREATE TABLE `visitkort` (
> [skip]
> > ) TYPE=MyISAM;
> >
> > 2) Insert a row with the following statement:
> >
> > 3) Run myisamchk with the option --extend-check and you get the
following
> > myisamchk: warning: 1 clients is using or hasn't closed the table
properly
>
> > The error does not occur, if you drop the FULLTEXT index
>
> Ok, I was able to repeat this, still I do not think it's a bug.
> Message given by myisamchk is perfectly legal - you should not expect
> MySQL to close the table immidiately when the client closes the
connection.
> MySQL can keep the table open to speedup access to it from, e.g.,
> next connection. MySQL will close the table on "FLUSH TABLE",
> or when the pool of opened tables is exceeded.
>
> if you will add "2.5) flush table" the error message will dissapear.
> if you will shutdown MySQL instead, you'll get no error, either.
> if you will issue "CHECK TABLE visitkort EXTENDED" instead of using
> external program myisamchk, again there will be no error message.
>
> So, looks like everything is ok.
>
> In you first message (without test case) you've also added
>
> > The result of this is, that if anyone is trying to update the same
record
> > afterwards, the index is corrupted.
>
> I wasn't able to reproduce that. If you have a test case for this, please,
> let me know.
>
> Regards,
> Sergei
>
> --
> MySQL Development Team
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
>  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
> /_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
>        <___/
>



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to