Now start the mysql console with
mysql
then select the database where the broken tables are and do
repair table tablename_to_repair
In your case it would be
use mysql;
repair table user;
If more then one table is broken you could write a php script that loops through all databases then loops through all tables and does a repair.
Pseudo code starts here
Code:
mysql_connect();
$DBs = mysql_query("Show databases");
foreach ($DBs as $DB){
mysql_query("Use $DB");
$Tables = mysql_query("Show tables");
foreach ($Tables as $Table){
mysql_query("Repair table $Table");
}
}
Hope that helps. Else just check back and I help you out.
Edit:
By the way a dist-upgrade does a version upgrade to the newest version. Mosttimes this is the unstable developer version. If you just want to keep uptodate do a
apt-get upgrade