Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Corrupted innodb table crashing mysql
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

WilliamRams
Starting Member

1 Posts

Posted - 09/25/2014 :  03:07:54  Show Profile  Reply with Quote
Hello,

Running a simple query against corrupted innodb table is crashing mysql instance .

table test.xyz got corrupt during crash and truncate table command was in progressing when mysql crash , now
running a simple select * query is also crashing db .
mysql> use test;
Database changed
mysql> select * from xyz;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
mysql>
mysql> select * from xzy;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR:
Can't connect to the server


Error Log :

[ERROR] Build InnoDB index translation table for Table ./test/xyz failed
[ERROR] Table ./test/xyz has no primary key in InnoDB data dictionary, but has one in MySQL! If you created the table with a MySQL version < 3.23.54 and did not define a primary key, but defined a unique key with all non-NULL columns, then MySQL internally treats that key as the primary key. You can fix this error by dump + DROP + CREATE + reimport of the table.
[Warning] Table ../test/xyz key_used_on_scan is 0 even though there is no primary key inside InnoDB.
[ERROR] Innodb could not find key n 0 with name PRIMARY from dict cache for table test.xyz

Any suggestion on how to recreate table will be highly appreciated .

robvolk
Most Valuable Yak

USA
15732 Posts

Posted - 09/25/2014 :  06:33:53  Show Profile  Visit robvolk's Homepage  Reply with Quote
SQLTeam.com is a Microsoft SQL Server website. There is a MySQL forum over at http://dbforums.com/
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000