1

I have a MySQL database table which crashes whenever I select from the table or perform any operation no matter how little it is. It crashes the whole MySQL instance.

The table is of the following structure and uses innodb as storage engine

id - int(10)
name - varchar(100)
image - varbinary(32k)

The table has about 800k records with a total size of 30GB.

Error Log

2016-10-20 12:52:16 2548 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-10-20 12:52:16 9544 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-10-20 12:52:16 9544 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-20 12:52:16 9544 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-10-20 12:52:16 9544 [Note] InnoDB: Memory barrier is not used
2016-10-20 12:52:16 9544 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-10-20 12:52:16 9544 [Note] InnoDB: Using generic crc32 instructions
2016-10-20 12:52:16 9544 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-10-20 12:52:16 9544 [Note] InnoDB: Completed initialization of buffer pool
2016-10-20 12:52:16 9544 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-20 12:52:16 9544 [Note] InnoDB: The log sequence numbers 53259298805 and 53259298805 in ibdata files do not match the log sequence number 53259298901 in the ib_logfiles!
2016-10-20 12:52:16 9544 [Note] InnoDB: Database was not shutdown normally!
2016-10-20 12:52:16 9544 [Note] InnoDB: Starting crash recovery.
2016-10-20 12:52:16 9544 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-10-20 12:52:20 9544 [Note] InnoDB: Restoring possible half-written data pages 
2016-10-20 12:52:20 9544 [Note] InnoDB: from the doublewrite buffer...
2016-10-20 12:52:21 9544 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-20 12:52:21 9544 [Note] InnoDB: Waiting for purge to start
2016-10-20 12:52:21 9544 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 53259298901
2016-10-20 12:52:22 6988 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-10-20 12:52:22 9544 [Note] Plugin 'FEEDBACK' is disabled.
2016-10-20 12:52:22 9544 [Note] Server socket created on IP: '::'.
2016-10-20 12:52:22 9544 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.10-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
InnoDB: Error: trying to access page number 1217926 in space 2075,
InnoDB: space name mj2016/mj1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
2016-10-20 12:52:40 102c  InnoDB: Assertion failure in thread 4140 in file fil0fil.cc line 5821
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.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
161020 12:52:40 [ERROR] mysqld got exception 0x80000003 ;
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.

To report this bug, see http://kb.askmonty.org/en/reporting-bugs

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.

Server version: 10.1.10-MariaDB
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=2
max_threads=1001
thread_count=2
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787099 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x5c991b8
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...
mysqld.exe!my_parameter_handler()
mysqld.exe!my_mb_ctype_mb()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!?free_frm_image@TABLE_SHARE@@QAEXPBE@Z()
mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z()
mysqld.exe!?ha_open@handler@@QAEHPAUTABLE@@PBDHI@Z()
mysqld.exe!?open_table_from_share@@YA?AW4open_frm_error@@PAVTHD@@PAUTABLE_SHARE@@PBDIIIPAUTABLE@@_N@Z()
mysqld.exe!?open_table@@YA_NPAVTHD@@PAUTABLE_LIST@@PAVOpen_table_context@@@Z()
mysqld.exe!?recover_from_failed_open@Open_table_context@@QAE_NXZ()
mysqld.exe!?open_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAPAUTABLE_LIST@@PAIIPAVPrelocking_strategy@@@Z()
mysqld.exe!?mysqld_show_create@@YA_NPAVTHD@@PAUTABLE_LIST@@@Z()
mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z()
mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z()
mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z()
mysqld.exe!?do_command@@YA_NPAVTHD@@@Z()
mysqld.exe!?threadpool_process_request@@YAHPAVTHD@@@Z()
mysqld.exe!?tp_end@@YAXXZ()
KERNEL32.DLL!SetUserGeoID()
ntdll.dll!TpReleaseTimer()
ntdll.dll!TpReleaseTimer()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlSubscribeWnfStateChangeNotification()
ntdll.dll!RtlSubscribeWnfStateChangeNotification()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7b72080): SHOW CREATE TABLE `mj1`
Connection ID (thread ID): 3
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on

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.
2016-10-20 13:03:51 2464 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-10-20 13:03:51 9316 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-10-20 13:03:51 9316 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-20 13:03:51 9316 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-10-20 13:03:51 9316 [Note] InnoDB: Memory barrier is not used
2016-10-20 13:03:51 9316 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-10-20 13:03:51 9316 [Note] InnoDB: Using generic crc32 instructions
2016-10-20 13:03:51 9316 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-10-20 13:03:51 9316 [Note] InnoDB: Completed initialization of buffer pool
2016-10-20 13:03:51 9316 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-20 13:03:51 9316 [Note] InnoDB: The log sequence numbers 53259298805 and 53259298805 in ibdata files do not match the log sequence number 53259298911 in the ib_logfiles!
2016-10-20 13:03:51 9316 [Note] InnoDB: Database was not shutdown normally!
2016-10-20 13:03:51 9316 [Note] InnoDB: Starting crash recovery.
2016-10-20 13:03:51 9316 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-10-20 13:03:51 9316 [Note] InnoDB: Restoring possible half-written data pages 
2016-10-20 13:03:51 9316 [Note] InnoDB: from the doublewrite buffer...
2016-10-20 13:03:53 9316 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-20 13:03:53 9316 [Note] InnoDB: Waiting for purge to start
2016-10-20 13:03:53 9316 [Note] InnoDB:  Percona XtraDB  5.6.26-76.0 started; log sequence number 53259298911
2016-10-20 13:03:53 9316 [Note] InnoDB: !!! innodb_force_recovery is set to 1 !!!
2016-10-20 13:03:53 9296 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-10-20 13:03:53 9316 [Note] Plugin 'FEEDBACK' is disabled.
2016-10-20 13:03:53 9316 [Note] Server socket created on IP: '::'.
2016-10-20 13:03:53 9316 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.10-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
InnoDB: Error: trying to access page number 1217926 in space 2075,
InnoDB: space name mj2016/mj1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
2016-10-20 13:06:52 2ad0  InnoDB: Assertion failure in thread 10960 in file fil0fil.cc line 5821
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: 
InnoDB: about forcing recovery.
161020 13:06:52 [ERROR] mysqld got exception 0x80000003 ;
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.

To report this bug, see http://kb.askmonty.org/en/reporting-bugs

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.

Server version: 10.1.10-MariaDB
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=3
max_threads=1001
thread_count=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787099 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x366efe8
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...
mysqld.exe!my_parameter_handler()
mysqld.exe!my_mb_ctype_mb()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!?free_frm_image@TABLE_SHARE@@QAEXPBE@Z()
mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z()
mysqld.exe!?ha_open@handler@@QAEHPAUTABLE@@PBDHI@Z()
mysqld.exe!?open_table_from_share@@YA?AW4open_frm_error@@PAVTHD@@PAUTABLE_SHARE@@PBDIIIPAUTABLE@@_N@Z()
mysqld.exe!?open_table@@YA_NPAVTHD@@PAUTABLE_LIST@@PAVOpen_table_context@@@Z()
mysqld.exe!?recover_from_failed_open@Open_table_context@@QAE_NXZ()
mysqld.exe!?open_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAPAUTABLE_LIST@@PAIIPAVPrelocking_strategy@@@Z()
mysqld.exe!?open_and_lock_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAUTABLE_LIST@@_NIPAVPrelocking_strategy@@@Z()
mysqld.exe!??_9handler@@$BBAE@AE()
mysqld.exe!?execute@Sql_cmd_check_table@@UAE_NPAVTHD@@@Z()
mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z()
mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z()
mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z()
mysqld.exe!?do_command@@YA_NPAVTHD@@@Z()
mysqld.exe!?threadpool_process_request@@YAHPAVTHD@@@Z()
mysqld.exe!?tp_end@@YAXXZ()
KERNEL32.DLL!SetUserGeoID()
ntdll.dll!TpReleaseTimer()
ntdll.dll!TpReleaseTimer()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlSubscribeWnfStateChangeNotification()
ntdll.dll!RtlSubscribeWnfStateChangeNotification()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7ecaf58): CHECK TABLE `mj1`
Connection ID (thread ID): 3
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on

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.
2016-10-20 13:26:38 1b8c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2016-10-20 13:26:38 7052 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2016-10-20 13:26:38 7052 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-20 13:26:38 7052 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-10-20 13:26:38 7052 [Note] InnoDB: Memory barrier is not used
2016-10-20 13:26:38 7052 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-10-20 13:26:38 7052 [Note] InnoDB: Using generic crc32 instructions
2016-10-20 13:26:38 7052 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2016-10-20 13:26:38 7052 [Note] InnoDB: Completed initialization of buffer pool
2016-10-20 13:26:38 7052 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-20 13:26:38 7052 [Note] InnoDB: The log sequence numbers 53259299380 and 53259299380 in ibdata files do not match the log sequence number 53259299390 in the ib_logfiles!
2016-10-20 13:26:38 7052 [Note] InnoDB: Database was not shutdown normally!
2016-10-20 13:26:38 7052 [Note] InnoDB: Starting crash recovery.
2016-10-20 13:26:38 7052 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-10-20 13:26:39 7052 [Note] InnoDB: Restoring possible half-written data pages 
2016-10-20 13:26:39 7052 [Note] InnoDB: from the doublewrite buffer...
2016-10-20 13:26:40 7052 [Warning] InnoDB: Resizing redo log from 2*3072 to 2*320 pages, LSN=53259299390
2016-10-20 13:26:40 7052 [Warning] InnoDB: Starting to delete and rewrite log files.
2016-10-20 13:26:40 7052 [Note] InnoDB: Setting log file \xampp\mysql\data\ib_logfile101 size to 5 MB
2016-10-20 13:26:41 7052 [Note] InnoDB: Setting log file \xampp\mysql\data\ib_logfile1 size to 5 MB
2016-10-20 13:26:41 7052 [Note] InnoDB: Renaming log file \xampp\mysql\data\ib_logfile101 to \xampp\mysql\data\ib_logfile0
2016-10-20 13:26:41 7052 [Warning] InnoDB: New log files created, LSN=53259299852
2016-10-20 13:26:41 7052 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-20 13:26:41 7052 [Note] InnoDB: Waiting for purge to start
2016-10-20 13:26:41 7052 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.26-76.0 started; log sequence number 53259299390
2016-10-20 13:26:42 9856 [Note] InnoDB: Dumping buffer pool(s) not yet started
2016-10-20 13:26:42 7052 [Note] Plugin 'FEEDBACK' is disabled.
2016-10-20 13:26:42 7052 [Note] Server socket created on IP: '::'.
2016-10-20 13:26:42 7052 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
Version: '10.1.10-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
InnoDB: Error: trying to access page number 1217926 in space 2075,
InnoDB: space name mj2016/mj1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
2016-10-20 14:14:25 870  InnoDB: Assertion failure in thread 2160 in file fil0fil.cc line 5821
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.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
161020 14:14:25 [ERROR] mysqld got exception 0x80000003 ;
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.

To report this bug, see http://kb.askmonty.org/en/reporting-bugs

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.

Server version: 10.1.10-MariaDB
key_buffer_size=16777216
read_buffer_size=262144
max_used_connections=10
max_threads=1001
thread_count=8
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787099 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x8190cd0
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...
mysqld.exe!my_parameter_handler()
mysqld.exe!my_mb_ctype_mb()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!??2Geometry@@SAPAXIPAX@Z()
mysqld.exe!?free_frm_image@TABLE_SHARE@@QAEXPBE@Z()
mysqld.exe!?propagate_equal_fields@Item_func_expr_str_metadata@@UAEPAVItem@@PAVTHD@@ABVContext@Value_source@@PAVCOND_EQUAL@@@Z()
mysqld.exe!?ha_open@handler@@QAEHPAUTABLE@@PBDHI@Z()
mysqld.exe!?open_table_from_share@@YA?AW4open_frm_error@@PAVTHD@@PAUTABLE_SHARE@@PBDIIIPAUTABLE@@_N@Z()
mysqld.exe!?open_table@@YA_NPAVTHD@@PAUTABLE_LIST@@PAVOpen_table_context@@@Z()
mysqld.exe!?recover_from_failed_open@Open_table_context@@QAE_NXZ()
mysqld.exe!?open_tables@@YA_NPAVTHD@@ABUDDL_options_st@@PAPAUTABLE_LIST@@PAIIPAVPrelocking_strategy@@@Z()
mysqld.exe!?open_normal_and_derived_tables@@YA_NPAVTHD@@PAUTABLE_LIST@@II@Z()
mysqld.exe!?send_data@select_result_text_buffer@@UAEHAAV?$List@VItem@@@@@Z()
mysqld.exe!?get_all_tables@@YAHPAVTHD@@PAUTABLE_LIST@@PAVItem@@@Z()
mysqld.exe!?get_schema_tables_result@@YA_NPAVJOIN@@W4enum_schema_table_state@@@Z()
mysqld.exe!?exec_inner@JOIN@@QAEXXZ()
mysqld.exe!?exec@JOIN@@QAEXXZ()
mysqld.exe!?handle_select@@YA_NPAVTHD@@PAULEX@@PAVselect_result@@K@Z()
mysqld.exe!??0Table_scope_and_contents_source_st@@QAE@ABU0@@Z()
mysqld.exe!?mysql_execute_command@@YAHPAVTHD@@@Z()
mysqld.exe!?mysql_parse@@YAXPAVTHD@@PADIPAVParser_state@@@Z()
mysqld.exe!?dispatch_command@@YA_NW4enum_server_command@@PAVTHD@@PADI@Z()
mysqld.exe!?do_command@@YA_NPAVTHD@@@Z()
mysqld.exe!?threadpool_process_request@@YAHPAVTHD@@@Z()
mysqld.exe!?tp_end@@YAXXZ()
KERNEL32.DLL!SetUserGeoID()
ntdll.dll!TpReleaseTimer()
ntdll.dll!TpReleaseTimer()
KERNEL32.DLL!BaseThreadInitThunk()
ntdll.dll!RtlSubscribeWnfStateChangeNotification()
ntdll.dll!RtlSubscribeWnfStateChangeNotification()
2

It mean You have a problem with InnoDB table

You can check few methods for repair:

  1. for all cases - stop MySQL, backup data folder

  2. run mysqlcheck command line utility

  3. if it not fix add tomy.ini row

    innodb_force_recovery = XX
    

where XX = 1,2,3,4,5,6 start from 1 if not help increase 2, then 3 and etc (restart MySQL after each changes)

with all level try to select data from table, when success:

  • dump table
  • comment innodb_force_recovery
  • drop table
  • restore table from backup
  • Whenever the mysqlcheck utility gets to the db it crashes – Ghost Worker Oct 21 '16 at 16:54
  • innodb_force_recovery = 6 worked for me. But innoDB tables are readonly... – Cedric Simon Oct 6 '17 at 21:27
  • no any but(!) - You must be happy at the moment when it stat be available for read :) – a_vlad Oct 7 '17 at 10:35
0

That's how I managed to recover my database:

  1. Edit /etc/my.cnf and add new line with innodb_force_recovery = 6
  2. Start MySQL service
  3. Backup all data: mysql -p --all-databases > all.sql
  4. Stop MySQL service and remove from /etc/my.cnf the line added at step 1.
  5. Drop all MySQL data files:

    cd /var/lib/mysql
    rm -r *
    
  6. Start mysql service
  7. Reimport the data: mysql <all/sql

Important note: I did try to set the innodb_force_recovery = X where X was 1 to 5, but could not start MySQL. Only started with X = 6. But I DID NOT try using X = 0.

So I would advise to try starting MySQL with innodb_force_recovery = 0 prior to do the above procedure. If your are lucky the database will repair itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.