Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-764

LP:785309 - Killing an ALTER TABLE causes table corruption or assertion



    • Type: Bug
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.30
    • Component/s: None
    • Labels:


      Reproducible on maria-5.1, maria-5.2, maria-5.3. Also reproducible on mysql-5.1, so it is a legacy bug.

      Killing an ALTER TABLE command causes one of the following:

      1. 0 when fixing table error
      2. 144 Table './test/C' is marked as crashed and last (automatic?) repair failed
      3. assertion:

      mysqld: mi_open.c:62: test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed.

      1. 2011-05-19T19:50:26 #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
      2. 2011-05-19T19:50:26 #9 0x084e3ff8 in test_if_reopen (filename=0x91714c94 "/home/philips/bzr/maria-5.3/mysql-test/var/master-data/test/DD.MYI") at mi_open.c:61
      3. 2011-05-19T19:50:26 #10 0x084e41bd in mi_open (name=0xa76d0560 "./test/DD", mode=2, open_flags=82) at mi_open.c:110
      4. 2011-05-19T19:50:26 #11 0x084c03f5 in ha_myisam::open (this=0xa746b6a8, name=0xa76d0560 "./test/DD", mode=2, test_if_locked=18) at ha_myisam.cc:711
      5. 2011-05-19T19:50:26 #12 0x083e2e72 in handler::ha_open (this=0xa746b6a8, table_arg=0xa746af78, name=0xa76d0560 "./test/DD", mode=2, test_if_locked=18) at handler.cc:2183
      6. 2011-05-19T19:50:26 #13 0x0830914e in open_table_from_share (thd=0xab67258, share=0xa76d02b8, alias=0xa7424b38 "DD", db_stat=39, prgflag=44, ha_open_flags=16,
      7. 2011-05-19T19:50:26 outparam=0xa746af78, is_create_table=false) at table.cc:2364
      8. 2011-05-19T19:50:26 #14 0x082f74c4 in open_unireg_entry (thd=0xab67258, entry=0xa746af78, table_list=0xa7463760, alias=0xa7424b38 "DD", cache_key=0x91715af1 "test",
      9. 2011-05-19T19:50:26 cache_key_length=8, mem_root=0x91715cf0, flags=0) at sql_base.cc:3990
      10. 2011-05-19T19:50:26 #15 0x082f517c in open_table (thd=0xab67258, table_list=0xa7463760, mem_root=0x91715cf0, refresh=0x91715d37, flags=2) at sql_base.cc:2959
      11. 2011-05-19T19:50:26 #16 0x082f885d in open_tables (thd=0xab67258, start=0x91715da4, counter=0x91715d8c, flags=2) at sql_base.cc:4691
      12. 2011-05-19T19:50:26 #17 0x082f96b7 in open_normal_and_derived_tables (thd=0xab67258, tables=0xa7463760, flags=2) at sql_base.cc:5158
      13. 2011-05-19T19:50:26 #18 0x08424857 in get_all_tables (thd=0xab67258, tables=0xa741cdb8, cond=0x0) at sql_show.cc:3888
      14. 2011-05-19T19:50:26 #19 0x0842ef67 in get_schema_tables_result (join=0xa7428b88, executed_place=PROCESSED_BY_JOIN_EXEC) at sql_show.cc:6680
      15. 2011-05-19T19:50:26 #20 0x08316481 in JOIN::exec (this=0xa7428b88) at sql_select.cc:2042
      16. 2011-05-19T19:50:26 #21 0x08318a16 in mysql_select (thd=0xab67258, rref_pointer_array=0xab68cf8, tables=0xa741cdb8, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0,
      17. 2011-05-19T19:50:26 group=0x0, having=0x0, proc_param=0x0, select_options=2684635648, result=0xa741db38, unit=0xab68958, select_lex=0xab68bf4) at sql_select.cc:2780
      18. 2011-05-19T19:50:26 #22 0x08310f3b in handle_select (thd=0xab67258, lex=0xab688fc, result=0xa741db38, setup_tables_done_option=0) at sql_select.cc:280
      19. 2011-05-19T19:50:26 #23 0x082ad584 in execute_sqlcom_select (thd=0xab67258, all_tables=0xa741cdb8) at sql_parse.cc:5098
      20. 2011-05-19T19:50:26 #24 0x082a43ce in mysql_execute_command (thd=0xab67258) at sql_parse.cc:2243
      21. 2011-05-19T19:50:26 #25 0x082afb27 in mysql_parse (thd=0xab67258, rawbuf=0xa741bea0 "show table status", length=17, found_semicolon=0x91717228) at sql_parse.cc:6098
      22. 2011-05-19T19:50:26 #26 0x082a2057 in dispatch_command (command=COM_QUERY, thd=0xab67258, packet=0xab692f9 "show table status", packet_length=17) at sql_parse.cc:1219
      23. 2011-05-19T19:50:26 #27 0x082a14a5 in do_command (thd=0xab67258) at sql_parse.cc:904
      24. 2011-05-19T19:50:26 #28 0x0829e545 in handle_one_connection (arg=0xab67258) at sql_connect.cc:1177
      25. 2011-05-19T19:50:26 #29 0x00821919 in start_thread () from /lib/libpthread.so.0
      26. 2011-05-19T19:50:26 #30 0x0076acce in clone () from /lib/libc.so.6
      27. 2011-05-19T19:50:26 #5 0x00abf424 in __kernel_vsyscall ()

      To reproduce, use the following RQG grammar:

              alter | kill ;

              ALTER TABLE _table ENABLE KEYS |
              ALTER TABLE _table DISABLe KEYS ;

              KILL _digit |
              KILL QUERY _digit ;

      and the following RQG command line:

      perl runall.pl --grammar=conf/alter_kill.yy --threads=10 --queries=10K --basedir=/home/philips/bzr/maria-5.3 --threads=2




            Unassigned Unassigned
            philipstoev Philip Stoev (Inactive)
            0 Vote for this issue
            1 Start watching this issue



                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.