重现方法
执行 select * from test,MySQL自动奔溃关闭,访问其他的表没有问题,单独这个表绝对会这样。
报错日志
07:30:01 UTC - mysqld got exception 0xc0000005 ;
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.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=8388608
read_buffer_size=8192
max_used_connections=2
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 = 49892 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0xd50b4b0
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...
13fb3919e mysqld.exe!??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z()
14037ef99 mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QEAAX_K@Z()
14037f259 mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QEAAX_K@Z()
14037e642 mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QEAAX_K@Z()
13fa377f6 mysqld.exe!?ha_open@handler@@QEAAHPEAUTABLE@@PEBDHH@Z()
13fbe04f6 mysqld.exe!?open_table_from_share@@YAHPEAVTHD@@PEAUTABLE_SHARE@@PEBDIIIPEAUTABLE@@_N@Z()
13fafaaa1 mysqld.exe!?open_table@@YA_NPEAVTHD@@PEAUTABLE_LIST@@PEAVOpen_table_context@@@Z()
13faf9b4d mysqld.exe!?open_and_lock_tables@@YA_NPEAVTHD@@PEAUTABLE_LIST@@IPEAVPrelocking_strategy@@@Z()
13fafb711 mysqld.exe!?open_tables@@YA_NPEAVTHD@@PEAPEAUTABLE_LIST@@PEAIIPEAVPrelocking_strategy@@@Z()
13fafbabe mysqld.exe!?open_tables_for_query@@YA_NPEAVTHD@@PEAUTABLE_LIST@@I@Z()
13fa558c8 mysqld.exe!?execute_init_command@@YAXPEAVTHD@@PEAUst_mysql_lex_string@@PEAUst_mysql_rwlock@@@Z()
13fa578d6 mysqld.exe!?mysql_execute_command@@YAHPEAVTHD@@_N@Z()
13fa5b358 mysqld.exe!?mysql_parse@@YAXPEAVTHD@@PEAVParser_state@@@Z()
13fa543f4 mysqld.exe!?dispatch_command@@YA_NPEAVTHD@@PEBTCOM_DATA@@W4enum_server_command@@@Z()
13fa5541a mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z()
13f9fbcac mysqld.exe!handle_connection()
140459772 mysqld.exe!?reserve@?$vector@EV?$allocator@E@std@@@std@@QEAAX_K@Z()
14016c2dc mysqld.exe!my_thread_once()
7fef8764f6b MSVCR120.dll!_beginthreadex()
7fef8765098 MSVCR120.dll!_endthreadex()
76d159cd kernel32.dll!BaseThreadInitThunk()
76fb385d ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (d5232b0): select * from test
Connection ID (thread ID): 2
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.
分析原因
这个新表是复制来自一个含有分区的新表,复制之后,执行正常,但在phpmyadmin上进行了增加操作,加入了10个新字段,点击保存结构后就一直出现自动奔溃退出,重启后只要select就立即如此。
解决方法
先删除这个表,重新复制一份,再ALTER TABLE tbl REMOVE PARTITIONING 移除表分区,重新加字段
当尝试访问特定表时,MySQL出现崩溃。通过日志分析,发现该表为复制自一个分区表并添加了新字段,这导致了崩溃。解决方法包括删除表,重新复制不带分区的版本,然后安全地添加字段。
1785





