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

Assertion `dict_table_get_n_cols(old_table) + dict_table_get_n_v_cols(old_table) >= table->s->fields + 3' failed in innobase_build_col_map upon ALTER after upgrade from 10.1

    XMLWordPrintable

Details

    Description

      See also MDEV-18084, MDEV-18085, MDEV-18086, MDEV-18087.

      10.2 734029fa796

      mysqld: /data/src/10.2/storage/innobase/handler/handler0alter.cc:3053: const ulint* innobase_build_col_map(Alter_inplace_info*, const TABLE*, const TABLE*, const dict_table_t*, const dict_table_t*, dtuple_t*, mem_heap_t*): Assertion `dict_table_get_n_cols(old_table) + dict_table_get_n_v_cols(old_table) >= table->s->fields + 3' failed.
      181227  2:46:44 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f28d7f21ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055b705e5331a in innobase_build_col_map (ha_alter_info=0x7f28d4a97660, altered_table=0x7f28683dec10, table=0x7f28682e3320, new_table=0x7f2868411138, old_table=0x7f2868131fd8, add_cols=0x0, heap=0x7f286820bb00) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:3051
      #9  0x000055b705e578e5 in prepare_inplace_alter_table_dict (ha_alter_info=0x7f28d4a97660, altered_table=0x7f28683dec10, old_table=0x7f28682e3320, table_name=0x7f286846103d "t1", flags=33, flags2=80, fts_doc_id_col=18446744073709551615, add_fts_doc_id=false, add_fts_doc_id_idx=false) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:4796
      #10 0x000055b705e5b897 in ha_innobase::prepare_inplace_alter_table (this=0x7f28682d8668, altered_table=0x7f28683dec10, ha_alter_info=0x7f28d4a97660) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:6273
      #11 0x000055b705b142af in handler::ha_prepare_inplace_alter_table (this=0x7f28682d8668, altered_table=0x7f28683dec10, ha_alter_info=0x7f28d4a97660) at /data/src/10.2/sql/handler.cc:4211
      #12 0x000055b705961d75 in mysql_inplace_alter_table (thd=0x7f2868000b00, table_list=0x7f2868011050, table=0x7f28682e3320, altered_table=0x7f28683dec10, ha_alter_info=0x7f28d4a97660, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f28d4a976d0, alter_ctx=0x7f28d4a98290) at /data/src/10.2/sql/sql_table.cc:7332
      #13 0x000055b70596756f in mysql_alter_table (thd=0x7f2868000b00, new_db=0x7f2868011660 "test", new_name=0x0, create_info=0x7f28d4a98ea0, table_list=0x7f2868011050, alter_info=0x7f28d4a98df0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9392
      #14 0x000055b7059e28d3 in Sql_cmd_alter_table::execute (this=0x7f2868011668, thd=0x7f2868000b00) at /data/src/10.2/sql/sql_alter.cc:329
      #15 0x000055b705899995 in mysql_execute_command (thd=0x7f2868000b00) at /data/src/10.2/sql/sql_parse.cc:6227
      #16 0x000055b70589e7f7 in mysql_parse (thd=0x7f2868000b00, rawbuf=0x7f2868010f78 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7f28d4a9a250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8014
      #17 0x000055b70588c12f in dispatch_command (command=COM_QUERY, thd=0x7f2868000b00, packet=0x7f28680191a1 "ALTER TABLE t1 FORCE", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1825
      #18 0x000055b70588aa92 in do_command (thd=0x7f2868000b00) at /data/src/10.2/sql/sql_parse.cc:1379
      #19 0x000055b7059dd569 in do_handle_one_connection (connect=0x55b70924c580) at /data/src/10.2/sql/sql_connect.cc:1335
      #20 0x000055b7059dd2f6 in handle_one_connection (arg=0x55b70924c580) at /data/src/10.2/sql/sql_connect.cc:1241
      #21 0x00007f28d99dd494 in start_thread (arg=0x7f28d4a9b700) at pthread_create.c:333
      #22 0x00007f28d7fde93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      No obvious effect on non-debug builds.

      To reproduce:

      • start 10.1 server with all defaults (current 10.1 9ad1663f78 or 10.1.37 will do, I didn't check other versions);
      • run

        CREATE TABLE t1 (b TINYTEXT, vb TINYTEXT AS (b) VIRTUAL);
        

      • shutdown server normally;
      • start 10.2+ server with all defaults on the same datadir;
      • run mysql_upgrade (optionally, it doesn't affect the outcome);
      • run

        CHECK TABLE t1;
        ALTER TABLE t1 FORCE;
        

      The datadir pre-created on current 10.1 as described is attached.

      Attachments

        1. data.tar.gz
          664 kB
          Elena Stepanova

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.