2

今日、最大パケット サイズが小さすぎたために失敗したデータベース (~650MB) をインポートしようとしました..これを修正しようとしているときに、何らかの理由でデータベースが破損しました。

今、私は次の問題を抱えています:

PhpMyAdmin で、破損しているテーブルを削除しようとすると、次のように返されます。

Fout
SQL-query: 

DROP DATABASE  `database_name`

MySQL retourneerde: 

#2013 - Lost connection to MySQL server during query 

このデータベースを除いて、他のすべてのデータベースは正常に機能します。my.cnf ファイルに innodb_force_recovery を 6 に設定するなど、いくつかの方法を試しました。

誰かがこのようなことを経験したことがありますか?

完全なエラー出力は次のとおりです。

Markering - 27 nov. 2012 16:49:06
121127 16:49:18  InnoDB: Assertion failure in thread 4516245504 in file dict0dict.c line 2643
InnoDB: Failing assertion: for_table || ref_table
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
15:49:18 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 134066 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1010c9000
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 10d306ed8 thread_stack 0x40000
0   mysqld                              0x000000010027a4fc my_print_stacktrace + 44�
1   mysqld                              0x0000000100021134 handle_fatal_signal + 692�
2   libsystem_c.dylib                   0x00007fff836038ea _sigtramp + 26�
3   mysqld                              0x00000001002efd87 mtr_memo_push + 23�
4   libsystem_c.dylib                   0x00007fff8365adce abort + 143�
5   mysqld                              0x00000001002baf96 dict_foreign_add_to_cache + 998�
6   mysqld                              0x00000001002c09c6 dict_load_foreigns + 1414�
7   mysqld                              0x00000001002c2b5b dict_load_table + 1707�
8   mysqld                              0x00000001003212b1 row_drop_database_for_mysql + 129�
9   mysqld                              0x000000010030b322 _ZL22innobase_drop_databaseP10handlertonPc + 226�
10  mysqld                              0x0000000100022601 _ZL17dropdb_handlertonP3THDP13st_plugin_intPv + 33�
11  mysqld                              0x0000000100178f7d _Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_ + 845�
12  mysqld                              0x0000000100140de3 _Z11mysql_rm_dbP3THDPcbb + 1859�
13  mysqld                              0x0000000100167143 _Z21mysql_execute_commandP3THD + 13491�
14  mysqld                              0x000000010016a386 _Z11mysql_parseP3THDPcjP12Parser_state + 294�
15  mysqld                              0x000000010016b49d _Z16dispatch_command19enum_server_commandP3THDPcj + 1709�
16  mysqld                              0x000000010016c387 _Z10do_commandP3THD + 231�
17  mysqld                              0x000000010020b581 _Z24do_handle_one_connectionP3THD + 353�
18  mysqld                              0x000000010020b639 handle_one_connection + 73�
19  libsystem_c.dylib                   0x00007fff83615742 _pthread_start + 327�
20  libsystem_c.dylib                   0x00007fff83602181 thread_start + 13�

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (10e002810): is an invalid pointer
Connection ID (thread ID): 9
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
121127 16:49:19 mysqld_safe mysqld restarted
121127 16:49:19 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
121127 16:49:19 [Note] Plugin 'FEDERATED' is disabled.
121127 16:49:19 InnoDB: The InnoDB memory heap is disabled
121127 16:49:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121127 16:49:19 InnoDB: Compressed tables use zlib 1.2.3
121127 16:49:19 InnoDB: Initializing buffer pool, size = 128.0M
121127 16:49:19 InnoDB: Completed initialization of buffer pool
121127 16:49:19 InnoDB: highest supported file format is Barracuda.
InnoDB: The user has set SRV_FORCE_NO_LOG_REDO on
InnoDB: Skipping log redo
121127 16:49:19  InnoDB: Waiting for the background threads to start
121127 16:49:20 InnoDB: 1.1.8 started; log sequence number 0
121127 16:49:20 InnoDB: !!! innodb_force_recovery is set to 6 !!!
121127 16:49:20 [Note] Event Scheduler: Loaded 0 events
121127 16:49:20 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.25'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 0  Source distribution
4

1 に答える 1

4

innodb_force_recoveryの各値を試した場合(3つはトランザクションのロールバックまたはフォワードを停止します)、次の点のみを指摘できます。

追いかけるために、このWebページの人はinnodbファイルを削除することになりました。

最後まで、この問題の明確な解決策は見つかりませんでした…しかし、テスト環境にいる場合は、ibdata1とib_logfile0、ib_logfile1を削除して、サーバーを再起動するだけです。私の場合、これはうまくいきました。

http://www.randombugs.com/linux/crash-innodb-table.html

明らかに、他のデータベースがたくさんある場合、これにはそれらのデータベースのバックアップと復元も含まれます。これを回避する他の方法を見つけた場合は、最初に試してみることをお勧めします。

Perconaは一連のデータ回復ツールを提供していますが、あなたの場合、データは問題ではありません

http://code.google.com/p/innodb-tools/

https://launchpad.net/percona-data-recovery-tool-for-innodb

于 2012-11-27T16:49:15.280 に答える