Bug #50186 mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when e
Submitted: 8 Jan 2010 13:00 Modified: 9 Jan 2010 13:17
Reporter: Marek Zakrzewski Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.1.42 OS:Linux (CentOS 5.4 64-bit)
Assigned to: CPU Architecture:Any
Tags: Lost connection, mysql_upgrade, mysqlcheck, upgrade

[8 Jan 2010 13:00] Marek Zakrzewski
Description:
mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ...  FOR UPGRADE'

I got this message, when I tried to run: mysql_upgrade -p

How to repeat:
100108 13:59:17 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50089, now running 50142. Please use mysql_upgrade to fix this error.
100108 13:59:17 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
100108 13:59:17 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.42'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
[8 Jan 2010 16:54] Valeriy Kravchuk
What exact table was checked at the moment of this crash? What version you were upgrading from?
[8 Jan 2010 17:02] Marek Zakrzewski
I'm upgrading from 5.0.89 to 5.1.42

leon173_portal.ox_session                          OK
leon173_portal.ox_targetstats                      OK
leon173_portal.ox_tracker_append                   OK
leon173_portal.ox_trackers                         OK
leon173_portal.ox_upgrade_action                   OK
leon173_portal.ox_userlog                          OK
leon173_portal.ox_variable_publisher               OK
leon173_portal.ox_variables                        OK
leon173_portal.ox_zones                            OK
leon173_portal.tabele_czytnikow                    OK
leon173_portal.tagi_bazy                           OK
leon173_portal.tagi_polaczenia                     OK
leon173_portal.tagi_tagi                           OK
FATAL ERROR: Upgrade failed
[8 Jan 2010 17:13] Valeriy Kravchuk
Please, send the results of:

show table status like 'tagi%';

from this database.
[8 Jan 2010 17:21] Marek Zakrzewski
tagi_bazy 	MyISAM 	10 	Dynamic 	146 	47 	6996 	281474976710655 	4096 	0 	147 	2009-12-30 11:50:53 	2010-01-08 17:42:34 	2010-01-08 18:05:13 	utf8_polish_ci  	NULL  	   	 
tagi_polaczenia 	MyISAM 	10 	Fixed 	190049 	17 	3230833 	4785074604081151 	7655424 	0 	190584 	2009-12-30 11:50:53 	2010-01-08 17:42:34 	2010-01-08 18:05:13 	utf8_polish_ci 	NULL 	  	 
tagi_tagi 	MyISAM 	10 	Dynamic 	653 	34 	22840 	281474976710655 	9216 	0 	654 	2009-12-30 11:50:54 	2010-01-08 17:42:34
[8 Jan 2010 17:41] Valeriy Kravchuk
OK, so crash happened with some other table, not those like 'tagi%'... Please, send the results of:

show table status;

from that database.
[8 Jan 2010 17:47] Marek Zakrzewski
SHOW TABLE STATUS

Attachment: mysql.txt (text/plain), 41.27 KiB.

[8 Jan 2010 21:04] Marek Zakrzewski
I found database causing this problem mc_godma_baza1
[9 Jan 2010 9:05] Valeriy Kravchuk
If mc_godma_baza1 is a database, had you identified the table on which mysqlcheck crashed? I need SHOW CREATE TABLE and SHOW TABLE STATUS results for this table to try to create a repeatable test case.
[9 Jan 2010 9:55] Marek Zakrzewski
It's was due to broken filesystem. So,it's not MySQL bug.

Everything is working fine now. Thank you for help.