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

handler0alter.cc:217: void dict_table_t::init_instant(const dict_table_t&) [with bool replace_dropped = true]: Assertion `index.n_nullable == n_nullable' failed.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.1
    • 10.4.2
    • None
    • Linux Ubuntu 17.10 but most probably not important.

    Description

      The problem was found during RQG testing on MariaDB 10.4 30641f9df77be99d93524e39cdc2b2d783e6d3e1 2018-12-18
      compiled with debug.
      There was no replay of the assert on actual 10.2 and 10.3.
       
      ts_2.test
      --------------
      --source include/have_innodb.inc
       CREATE TABLE t1 (col1 INT, col2 INT, col_int INTEGER, col_text TEXT) ENGINE = InnoDB ROW_FORMAT = Redundant  ;
       ALTER TABLE t1 ADD UNIQUE INDEX `uidx2` ( col_int )  ;
       ALTER TABLE t1 ADD PRIMARY KEY ( col_int )  ;
       ALTER TABLE t1 DROP PRIMARY KEY  ;
       ALTER TABLE t1 ADD PRIMARY KEY ( col2 )  ;
       INSERT INTO t1 (col1,col2, col_int, col_text) VALUES ( 1, 1, 1, '1') ;
       ALTER TABLE t1 ADD UNIQUE INDEX `uidx3` ( col2 )  ;
       ALTER TABLE t1 DROP PRIMARY KEY ;
       ALTER TABLE t1 DROP COLUMN col_text ;
       
      ALTER TABLE t1 CHANGE COLUMN col_int col_int INTEGER;
       
      --enable_abort_on_error
      SHOW PROCESSLIST;
       
      Version: '10.4.1-MariaDB-debug-log'  socket:...
      mysqld: storage/innobase/handler/handler0alter.cc:217: void dict_table_t::init_instant(const dict_table_t&) [with bool replace_dropped = true]: Assertion `index.n_nullable == n_nullable' failed.
      181218 18:04:05 [ERROR] mysqld got signal 6 ;
      ...
      Query (0x7f5074014190): ALTER TABLE t1 CHANGE COLUMN col_int col_int INTEGER
      Connection ID (thread ID): 9
      Status: NOT_KILLED
      ...
      Thread 1 (Thread 0x7f50d03d4700 (LWP 30483)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000056324c031b94 in my_write_core (sig=6) at mysys/stacktrace.c:481
      #2  0x000056324b877ca3 in handle_fatal_signal (sig=6) at sql/signal_handler.cc:305
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007f50d684ff5d in __GI_abort () at abort.c:90
      #6  0x00007f50d6845f17 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x56324c3271f0 "index.n_nullable == n_nullable", file=file@entry=0x56324c321980 "storage/innobase/handler/handler0alter.cc", line=line@entry=217, function=function@entry=0x56324c329060 <void dict_table_t::init_instant<true>(dict_table_t const&)::__PRETTY_FUNCTION__> "void dict_table_t::init_instant(const dict_table_t&) [with bool replace_dropped = true]") at assert.c:92
      #7  0x00007f50d6845fc2 in __GI___assert_fail (assertion=0x56324c3271f0 "index.n_nullable == n_nullable", file=0x56324c321980 "storage/innobase/handler/handler0alter.cc", line=217, function=0x56324c329060 <void dict_table_t::init_instant<true>(dict_table_t const&)::__PRETTY_FUNCTION__> "void dict_table_t::init_instant(const dict_table_t&) [with bool replace_dropped = true]") at assert.c:101
      #8  0x000056324baeea49 in dict_table_t::init_instant<true> (this=0x7f50741a1cd8, table=...) at storage/innobase/handler/handler0alter.cc:217
      #9  0x000056324bae86c7 in dict_table_t::instant_column (this=0x7f50741a1cd8, table=..., col_map=0x7f50740680e8) at storage/innobase/handler/handler0alter.cc:630
      #10 0x000056324baea38d in ha_innobase_inplace_ctx::instant_column (this=0x7f5074015c80) at storage/innobase/handler/handler0alter.cc:1030
      #11 0x000056324bad0cbf in innobase_instant_try (ha_alter_info=0x7f50d03d0bb0, ctx=0x7f5074015c80, altered_table=0x7f507406cc28, table=0x7f5074064458, trx=0x7f50d066b218) at storage/innobase/handler/handler0alter.cc:5385
      #12 0x000056324baecaf9 in commit_try_norebuild (ha_alter_info=0x7f50d03d0bb0, ctx=0x7f5074015c80, altered_table=0x7f507406cc28, old_table=0x7f5074064458, trx=0x7f50d066b218, table_name=0x7f5074069bf5 "t1") at storage/innobase/handler/handler0alter.cc:10047
      #13 0x000056324badfc1d in ha_innobase::commit_inplace_alter_table (this=0x7f5074068340, altered_table=0x7f507406cc28, ha_alter_info=0x7f50d03d0bb0, commit=true) at storage/innobase/handler/handler0alter.cc:10682
      #14 0x000056324b88404b in handler::ha_commit_inplace_alter_table (this=0x7f5074068340, altered_table=0x7f507406cc28, ha_alter_info=0x7f50d03d0bb0, commit=true) at sql/handler.cc:4492
      #15 0x000056324b645448 in mysql_inplace_alter_table (thd=0x7f5074000ce8, table_list=0x7f50740142a8, table=0x7f5074064458, altered_table=0x7f507406cc28, ha_alter_info=0x7f50d03d0bb0, inplace_supported=HA_ALTER_INPLACE_INSTANT, target_mdl_request=0x7f50d03d0ce0, alter_ctx=0x7f50d03d18d0) at sql/sql_table.cc:7590
      #16 0x000056324b64b286 in mysql_alter_table (thd=0x7f5074000ce8, new_db=0x7f50740053b0, new_name=0x7f5074005780, create_info=0x7f50d03d24c0, table_list=0x7f50740142a8, alter_info=0x7f50d03d2400, order_num=0, order=0x0, ignore=false) at sql/sql_table.cc:9688
      #17 0x000056324b6d526e in Sql_cmd_alter_table::execute (this=0x7f5074014a08, thd=0x7f5074000ce8) at sql/sql_alter.cc:491
      #18 0x000056324b5738d0 in mysql_execute_command (thd=0x7f5074000ce8) at sql/sql_parse.cc:6302
      #19 0x000056324b578a8c in mysql_parse (thd=0x7f5074000ce8, rawbuf=0x7f5074014190 "ALTER TABLE t1 CHANGE COLUMN col_int col_int INTEGER", length=52, parser_state=0x7f50d03d35f0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8104
      #20 0x000056324b5659ba in dispatch_command (command=COM_QUERY, thd=0x7f5074000ce8, packet=0x7f507400acd9 "ALTER TABLE t1 CHANGE COLUMN col_int col_int INTEGER", packet_length=52, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1850
      #21 0x000056324b5643cf in do_command (thd=0x7f5074000ce8) at sql/sql_parse.cc:1395
      #22 0x000056324b6cf29e in do_handle_one_connection (connect=0x56324f0a7968) at sql/sql_connect.cc:1402
      #23 0x000056324b6cf015 in handle_one_connection (arg=0x56324f0a7968) at sql/sql_connect.cc:1308
      #24 0x000056324bfc9d63 in pfs_spawn_thread (arg=0x56324f0edd98) at storage/perfschema/pfs.cc:1862
      #25 0x00007f50d74f17fc in start_thread (arg=0x7f50d03d4700) at pthread_create.c:465
      #26 0x00007f50d692bb5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        1. ts_2.test
          0.8 kB
          Matthias Leich

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              mleich Matthias Leich
              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.