Solved

Fix "Got error 134 from storage engine"

Posted on 2008-08-21
1
2,059 Views
Last Modified: 2012-06-21
Hi, I have a table "pc_table" not working well. One of the errors is "Got error 134 from storage engine". I would appreciate if someone could help.

mysql> select * from pc_table where pc_id=654565;
ERROR 1030 (HY000): Got error 134 from storage engine

also when i do a "insert into pc_table blabla" I will get the following error:
"DBD::mysql::st execute failed: Duplicate entry '654565' for key 1"

My php script was not able to connect to the database today and I had to restart mysqld. I think probably this "error 134" error is the reason?

And here is the output from "check table":

mmysql> check table pc_table EXTENDED;
+----------------------+-------+----------+--------------------------------------------------------------------------------------------+
| Table                | Op    | Msg_type | Msg_text                                                                                   |
+----------------------+-------+----------+--------------------------------------------------------------------------------------------+
| mydb.pc_table | check | warning  | Table is marked as crashed                                                                 |
| mydb.pc_table | check | warning  | 2 clients are using or haven't closed the table properly                                   |
| mydb.pc_table | check | error    | Invalid key block position: 284932588628148224  key block size: 1024  file_length: 3870720 |
| mydb.pc_table | check | error    | key delete-link-chain corrupted                                                            |
| mydb.pc_table | check | error    | Corrupt                                                                                    |
+----------------------+-------+----------+--------------------------------------------------------------------------------------------+

Could somebody tell me:
1) what's the cause of the error? and how to prevent it in the future?
2) what's the best way to fix it? Use 'repair table' or load the corrupted pc_table from a backup? (I have a 1 day old backup).
Lose a few records is ok for me but I need to make sure this doesn't affect other tables in the database and the same problem doesn't happen again.

Thank you very much.
0
Comment
Question by:sub99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
ServiceLogix earned 500 total points
ID: 22286598
Assuming you're using MyISAM tables here...

1) Sometimes it just happens.  It happens more frequently for us on tables that have a fulltext index and are updated or deleted.  However, it does happen occasionally on pretty simple tables as well.

2) Two ways to repair:  repair table <table> or myisamchk http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html

Here's a link describing some of these sorts of problems and best practices:

http://dev.mysql.com/doc/refman/5.0/en/repair.html
0

Featured Post

Upcoming Webinar: Securing your MySQL/MariaDB data

Join Percona’s Chief Evangelist, Colin Charles as he presents Securing your MySQL®/MariaDB® data on Tuesday, July 11, 2017 at 7:00 am PDT / 10:00 am EDT (UTC-7).

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question