Hi,

Sometimes when I try to open a page in my drupal instalation, it says:

"""
Fatal error: Can't open file: 'shared_sessions.MYI'. (errno: 145) query:
SELECT u.*, s.* FROM shared_users u INNER JOIN shared_sessions s ON
u.uid = s.uid WHERE s.sid = 'ce72fae8192ba1c0c458b1c8c6b23bd7' AND
u.status < 3 LIMIT 0, 1 in /var/www/drupal/includes/database.mysql.inc
on line 66
"""

MySQL log gives me the following warnings:

"""
warning : 1 client is using or hasn't closed the table properly
drupal.shared_sessions
warning : 1 client is using or hasn't closed the table properly
warning : Size of indexfile is: 2032640 Should be: 2031616
warning : Size of datafile is: 2019656 Should be: 2019276
error : Record-count is not ok; is 26540 Should be: 26535
warning : Found 27286 parts Should be: 27281 parts
error : Corrupt
""

The problem is that the index of the table shared_sessions is corrupted. Then I run some MySQL commands in order to repair the index file and everything starts to work again. But I had this problem twice in less than one month, so I'm trying to figure out what's the and how to fix it. Any clues?

Thanks.
Rodrigo