Mysql crashes on query INSERT IGNORE INTO table_1 SELECT * FROM table_2

0

I am trying to merge to tables to a single one with the query

INSERT IGNORE   INTO table1 SELECT *   FROM table2 

When I run each time this query crashes mysql in Xampp. Both table1 and table 2 are very large contains more than 1 crore (ten million) records. Mysql Error Log is shown as below.

2017-09-01 15:06:30 2500 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.
    2017-09-01 15:06:30 9472 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2017-09-01 15:06:30 9472 [Note] InnoDB: The InnoDB memory heap is disabled
    2017-09-01 15:06:30 9472 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2017-09-01 15:06:30 9472 [Note] InnoDB: Memory barrier is not used
    2017-09-01 15:06:30 9472 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2017-09-01 15:06:30 9472 [Note] InnoDB: Using generic crc32 instructions
    2017-09-01 15:06:30 9472 [Note] InnoDB: Initializing buffer pool, size = 512.0M
    2017-09-01 15:06:30 9472 [Note] InnoDB: Completed initialization of buffer pool
    2017-09-01 15:06:30 9472 [Note] InnoDB: Highest supported file format is Barracuda.
    2017-09-01 15:06:30 9472 [Note] InnoDB: The log sequence numbers 67685340112 and 67685340112 in ibdata files do not match the log sequence number 67685348376 in the ib_logfiles!
    2017-09-01 15:06:30 9472 [Note] InnoDB: Database was not shutdown normally!
    2017-09-01 15:06:30 9472 [Note] InnoDB: Starting crash recovery.
    2017-09-01 15:06:30 9472 [Note] InnoDB: Reading tablespace information from the .ibd files...
    2017-09-01 15:06:30 9472 [Note] InnoDB: Restoring possible half-written data pages 
    2017-09-01 15:06:30 9472 [Note] InnoDB: from the doublewrite buffer...
    2017-09-01 15:06:31 9472 [Note] InnoDB: 128 rollback segment(s) are active.
    2017-09-01 15:06:31 9472 [Note] InnoDB: Waiting for purge to start
    2017-09-01 15:06:31 9472 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 67685348376
    2017-09-01 15:06:31 5448 [Note] InnoDB: Dumping buffer pool(s) not yet started
    2017-09-01 15:06:31 9472 [Note] Plugin 'FEEDBACK' is disabled.
    2017-09-01 15:06:31 9472 [Note] Server socket created on IP: '::'.
    2017-09-01 15:06:31 9472 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
    Version: '10.1.13-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution
    InnoDB: Error: trying to access page number 257218 in space 46,
    InnoDB: space name mnis/sdr,
    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.
    2017-09-01 15:06:36 1a44  InnoDB: Assertion failure in thread 6724 in file fil0fil.cc line 5866
    InnoDB: We intentionally generate a memory trap.
    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: about forcing recovery.
    170901 15:06:36 [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.


    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.13-MariaDB
    key_buffer_size=16777216
    read_buffer_size=262144
    max_used_connections=1
    max_threads=1001
    thread_count=1
    It is possible that mysqld could use up to 
    key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 787100 K  bytes of memory
    Hope that's ok; if not, decrease some variables in the equation.

    Thread pointer: 0x0x262c9010
    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!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?functype@Item_func_dyncol_create@@UBE?AW4Functype@Item_func@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!?get_ctx@MDL_ticket@@QBEPAVMDL_context@@XZ()
    mysqld.exe!??0Global_read_lock@@QAE@XZ()
    mysqld.exe!?get_trg_event_map@Update_rows_log_event@@UAEEXZ()
    mysqld.exe!?ha_write_row@handler@@QAEHPAE@Z()
    mysqld.exe!?write_record@@YAHPAVTHD@@PAUTABLE@@PAUst_copy_info@@@Z()
    mysqld.exe!?send_data@select_insert@@UAEHAAV?$List@VItem@@@@@Z()
    mysqld.exe!?sub_select@@YA?AW4enum_nested_loop_state@@PAVJOIN@@PAUst_join_table@@_N@Z()
    mysqld.exe!?create_internal_tmp_table_from_heap@@YA_NPAVTHD@@PAUTABLE@@PAUst_maria_columndef@@PAPAU3@H_NPA_N@Z()
    mysqld.exe!?sub_select@@YA?AW4enum_nested_loop_state@@PAVJOIN@@PAUst_join_table@@_N@Z()
    mysqld.exe!?setup_end_select_func@@YAP6A?AW4enum_nested_loop_state@@PAVJOIN@@PAUst_join_table@@_N@Z0@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!?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!SortGetHandle()
    ntdll.dll!LdrAddRefDll()
    ntdll.dll!RtlValidAcl()
    KERNEL32.DLL!BaseThreadInitThunk()
    ntdll.dll!RtlGetAppContainerNamedObjectPath()
    ntdll.dll!RtlGetAppContainerNamedObjectPath()

    Trying to get some variables.
    Some pointers may be invalid and cause the dump to abort.
    Query (0x262d03a8): 

        `INSERT IGNORE
        INTO sdr
        SELECT *
        FROM jio`


    Connection ID (thread ID): 2
    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


    information that should help you find out what is causing the crash.
    2017-09-01 15:16:39 2a7c 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.

        2017-09-01 15:16:39 10876 [Note] InnoDB: Using mutexes to ref count buffer pool pages
        2017-09-01 15:16:39 10876 [Note] InnoDB: The InnoDB memory heap is disabled
        2017-09-01 15:16:39 10876 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
        2017-09-01 15:16:39 10876 [Note] InnoDB: Memory barrier is not used
        2017-09-01 15:16:39 10876 [Note] InnoDB: Compressed tables use zlib 1.2.3
        2017-09-01 15:16:39 10876 [Note] InnoDB: Using generic crc32 instructions
        2017-09-01 15:16:39 10876 [Note] InnoDB: Initializing buffer pool, size = 512.0M
        2017-09-01 15:16:39 10876 [Note] InnoDB: Completed initialization of buffer pool
        2017-09-01 15:16:39 10876 [Note] InnoDB: Highest supported file format is Barracuda.
        2017-09-01 15:16:39 10876 [Note] InnoDB: The log sequence numbers 67685340112 and 67685340112 in ibdata files do not match the log sequence number 67685348386 in the ib_logfiles!
        2017-09-01 15:16:39 10876 [Note] InnoDB: Database was not shutdown normally!
        2017-09-01 15:16:39 10876 [Note] InnoDB: Starting crash recovery.
        2017-09-01 15:16:39 10876 [Note] InnoDB: Reading tablespace information from the .ibd files...
        2017-09-01 15:16:40 10876 [Note] InnoDB: Restoring possible half-written data pages 
        2017-09-01 15:16:40 10876 [Note] InnoDB: from the doublewrite buffer...
        2017-09-01 15:16:40 10876 [Note] InnoDB: 128 rollback segment(s) are active.
        2017-09-01 15:16:40 10876 [Note] InnoDB: Waiting for purge to start
        2017-09-01 15:16:40 10876 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 67685348386
        2017-09-01 15:16:41 10592 [Note] InnoDB: Dumping buffer pool(s) not yet started
        2017-09-01 15:16:41 10876 [Note] Plugin 'FEEDBACK' is disabled.
        2017-09-01 15:16:41 10876 [Note] Server socket created on IP: '::'.
        2017-09-01 15:16:41 10876 [Note] c:\xampp\mysql\bin\mysqld.exe: ready for connections.
        Version: '10.1.13-MariaDB'  socket: ''  port: 3306  mariadb.org binary distribution

thanks in advance for your help

mysql
asked on Stack Overflow Sep 1, 2017 by Vineeth Kumar • edited Sep 1, 2017 by O. Jones

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0