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

Assertion `0' failed in retrieve_auto_increment upon attempt to drop PK

    XMLWordPrintable

Details

    • 5.5.59, 10.0.34

    Description

      CREATE TABLE t1 (b BIT(1), pk INTEGER AUTO_INCREMENT PRIMARY KEY);
      ALTER TABLE t1 ADD INDEX(b,pk);
      INSERT INTO t1 VALUES (1,b'1');
      ALTER TABLE t1 DROP PRIMARY KEY;
       
      # Cleanup
      DROP TABLE t1;
      

      5.5 84c9c8b2e9d68d70

      mysqld: /data/src/5.5/storage/myisam/mi_key.c:602: retrieve_auto_increment: Assertion `0' failed.
      180109 14:22:32 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f54fd11cee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000000000a43040 in retrieve_auto_increment (info=0x7f54f7ca8e60, record=0x7f54f7c59478 "\375\001") at /data/src/5.5/storage/myisam/mi_key.c:602
      #9  0x0000000000a5e06c in mi_write (info=0x7f54f7ca8e60, record=0x7f54f7c59478 "\375\001") at /data/src/5.5/storage/myisam/mi_write.c:147
      #10 0x0000000000a1cda5 in ha_myisam::write_row (this=0x7f54f7c79078, buf=0x7f54f7c59478 "\375\001") at /data/src/5.5/storage/myisam/ha_myisam.cc:852
      #11 0x00000000007b8f39 in handler::ha_write_row (this=0x7f54f7c79078, buf=0x7f54f7c59478 "\375\001") at /data/src/5.5/sql/handler.cc:5203
      #12 0x00000000006a480d in copy_data_between_tables (thd=0x7f54f8e64060, from=0x7f54f7dd9460, to=0x7f54f7ca8060, create=..., ignore=false, order_num=0, order=0x0, copied=0x7f54feb8f448, deleted=0x7f54feb8f440, keys_onoff=LEAVE_AS_IS, error_if_not_empty=false) at /data/src/5.5/sql/sql_table.cc:7674
      #13 0x00000000006a2417 in mysql_alter_table (thd=0x7f54f8e64060, new_db=0x7f54f7d48730 "test", new_name=0x7f54f7d48128 "t1", create_info=0x7f54feb8f6e0, table_list=0x7f54f7d48160, alter_info=0x7f54feb8f640, order_num=0, order=0x0, ignore=false, require_online=false) at /data/src/5.5/sql/sql_table.cc:6935
      #14 0x0000000000924b94 in Alter_table_statement::execute (this=0x7f54f7d48758, thd=0x7f54f8e64060) at /data/src/5.5/sql/sql_alter.cc:106
      #15 0x0000000000606a7c in mysql_execute_command (thd=0x7f54f8e64060) at /data/src/5.5/sql/sql_parse.cc:4503
      #16 0x0000000000609dc0 in mysql_parse (thd=0x7f54f8e64060, rawbuf=0x7f54f7d48078 "ALTER TABLE t1 DROP PRIMARY KEY", length=31, parser_state=0x7f54feb90640) at /data/src/5.5/sql/sql_parse.cc:5923
      #17 0x00000000005fdad5 in dispatch_command (command=COM_QUERY, thd=0x7f54f8e64060, packet=0x7f54fcb5b061 "ALTER TABLE t1 DROP PRIMARY KEY", packet_length=31) at /data/src/5.5/sql/sql_parse.cc:1066
      #18 0x00000000005fccc7 in do_command (thd=0x7f54f8e64060) at /data/src/5.5/sql/sql_parse.cc:793
      #19 0x00000000006ffd33 in do_handle_one_connection (thd_arg=0x7f54f8e64060) at /data/src/5.5/sql/sql_connect.cc:1268
      #20 0x00000000006ffac0 in handle_one_connection (arg=0x7f54f8e64060) at /data/src/5.5/sql/sql_connect.cc:1184
      #21 0x0000000000a0dc77 in pfs_spawn_thread (arg=0x7f54f9b76fc0) at /data/src/5.5/storage/perfschema/pfs.cc:1015
      #22 0x00007f54fe7c3494 in start_thread (arg=0x7f54feb91700) at pthread_create.c:333
      #23 0x00007f54fd1d993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Activity

          People

            sachin.setiya.007 Sachin Setiya (Inactive)
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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