Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Incorrect key file for table

Quote Reply
Incorrect key file for table
Hi

I am getting this error message
MySQL said: Incorrect key file for table: 'gforum_User'. Try to repair it.

I ran isamchk on it and these is what I get.

----------------------------------------------------------
[root@ns1 carforum]# isamchk -d -v gforum_User

ISAM file: gforum_User
Isam-version: 2
Creation time: 2002-07-14 0:22:11
Data records: 864 Deleted blocks: 3
Datafile Parts: 960 Deleted data: 525
Datafile pointer (bytes): 4 Keyfile pointer (bytes): 3
Recordlength: 2054
Record format: Packed

table description:
Key Start Len Index Type Root Blocksize Rec/key
1 514 4 multip. long 16384 1024 0
2 518 1 multip. int8 12288 1024 0
1 4 unsigned long
3 5 50 unique text packed stripped 10240 1024 1
4 1 4 unique unsigned long 18432 1024 1
5 126 75 multip. text packed stripped 7168 1024 0
----------------------------------------------------------
[root@ns1 carforum]# isamchk -i -v gforum_User
Checking ISAM file: gforum_User
Data records: 864 Deleted blocks: 3
- check file-size
- check delete-chain
index 1:
index 2:
index 3:
index 4:
index 5:
Recordlinks: 158788 157594 163661

- check index reference
- check data record references index: 1
Key: 1: Keyblocks used: 67% Packed: 0% Max levels: 2
- check data record references index: 2
Key: 2: Keyblocks used: 63% Packed: 0% Max levels: 2
- check data record references index: 3
Key: 3: Keyblocks used: 62% Packed: 79% Max levels: 2
- check data record references index: 4
Key: 4: Keyblocks used: 61% Packed: 0% Max levels: 2
- check data record references index: 5
Key: 5: Keyblocks used: 70% Packed: 69% Max levels: 2
Total: Keyblocks used: 66% Packed: 61%

- check record links
Records: 864 M.recordlength: 184 Packed: 0%
Recordspace used: 99% Empty space: 0% Blocks/Record: 1.11
Record blocks: 957 Delete blocks: 3
Record data: 159307 Deleted data : 525
Lost space: 940 Linkdata: 3519

User time 0.02, System time 0.01
Maximum resident set size 0, Integral resident set size 0
Non physical pagefaults 58, Physical pagefaults 73, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Vouluntary context switches 0, Invouluntary context switches 0

----------------------------------------------------------

However the problem still exist. What can I do to solve this?

Thanks.
Quote Reply
Re: [dauhee] Incorrect key file for table In reply to
Try running:

myisamchk -r gforum_User

from within MySQL's data directory. That should be able to fix up the problem.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] Incorrect key file for table In reply to
Thanks a million! Yes it did fix the problem.