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

Assertion `pos < table->n_def' failed in dict_table_get_nth_col or Assertion `col_nr < table->n_def' failed in dict_table_get_col_name upon TRUNCATE after upgrade from 10.1

    XMLWordPrintable

Details

    Description

      10.2 b718ec05

      mysqld: /data/src/10.2/storage/innobase/dict/dict0dict.cc:630: const char* dict_table_get_col_name(const dict_table_t*, ulint): Assertion `col_nr < table->n_def' failed.
      190404 19:20:59 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f959f6ddee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000560567b7f34a in dict_table_get_col_name (table=0x7f95243abd78, col_nr=14) at /data/src/10.2/storage/innobase/dict/dict0dict.cc:630
      #9  0x00005605678dddd8 in innodb_base_col_setup_for_stored (table=0x7f95243abd78, field=0x7f95242d6b50, s_col=0x7f959c146ac0) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:10991
      #10 0x00005605678f4869 in create_table_info_t::create_table_def (this=0x7f959c146e50) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:11259
      #11 0x00005605678dff58 in create_table_info_t::create_table (this=0x7f959c146e50, create_fk=false) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:12578
      #12 0x00005605678f53be in ha_innobase::create (this=0x7f95243aa488, name=0x7f95242f3350 "test/t4", form=0x7f95243a9880, create_info=0x7f959c147380, file_per_table=true, trx=0x7f959c1e13a8) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:12916
      #13 0x00005605678e1881 in ha_innobase::truncate (this=0x7f95243aa488) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:13601
      #14 0x00005605675c8857 in handler::ha_truncate (this=0x7f95243aa488) at /data/src/10.2/sql/handler.cc:4163
      #15 0x00005605677919e0 in Sql_cmd_truncate_table::handler_truncate (this=0x7f95240117b0, thd=0x7f9524000b00, table_ref=0x7f9524011198, is_tmp_table=false) at /data/src/10.2/sql/sql_truncate.cc:245
      #16 0x0000560567792037 in Sql_cmd_truncate_table::truncate_table (this=0x7f95240117b0, thd=0x7f9524000b00, table_ref=0x7f9524011198) at /data/src/10.2/sql/sql_truncate.cc:442
      #17 0x00005605677921a8 in Sql_cmd_truncate_table::execute (this=0x7f95240117b0, thd=0x7f9524000b00) at /data/src/10.2/sql/sql_truncate.cc:499
      #18 0x000056056734b4f0 in mysql_execute_command (thd=0x7f9524000b00) at /data/src/10.2/sql/sql_parse.cc:6226
      #19 0x0000560567350341 in mysql_parse (thd=0x7f9524000b00, rawbuf=0x7f95240110d0 "TRUNCATE t4", length=11, parser_state=0x7f959c148250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8013
      #20 0x000056056733de3e in dispatch_command (command=COM_QUERY, thd=0x7f9524000b00, packet=0x7f95240191b1 "TRUNCATE t4", packet_length=11, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1832
      #21 0x000056056733c75b in do_command (thd=0x7f9524000b00) at /data/src/10.2/sql/sql_parse.cc:1386
      #22 0x000056056748fec9 in do_handle_one_connection (connect=0x56056ae49180) at /data/src/10.2/sql/sql_connect.cc:1335
      #23 0x000056056748fc56 in handle_one_connection (arg=0x56056ae49180) at /data/src/10.2/sql/sql_connect.cc:1241
      #24 0x00007f95a15cc494 in start_thread (arg=0x7f959c149700) at pthread_create.c:333
      #25 0x00007f959f79a93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 532fffb4

      mysqld: /data/src/10.3/storage/innobase/include/dict0dict.ic:446: dict_col_t* dict_table_get_nth_col(const dict_table_t*, ulint): Assertion `pos < table->n_def' failed.
      190404 19:41:45 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f491fe36ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000556826e894ef in dict_table_get_nth_col (table=0x7f4898039ad8, pos=14) at /data/src/10.3/storage/innobase/include/dict0dict.ic:446
      #9  0x0000556826eb36d3 in dict_table_get_col_name (table=0x7f4898039ad8, col_nr=14) at /data/src/10.3/storage/innobase/include/dict0dict.h:878
      #10 0x0000556826e9f644 in innodb_base_col_setup_for_stored (table=0x7f4898039ad8, field=0x7f48980218f0, s_col=0x7f491c89f930) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:10828
      #11 0x0000556826eb5110 in create_table_info_t::create_table_def (this=0x7f491c89fcc0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:11101
      #12 0x0000556826ea172f in create_table_info_t::create_table (this=0x7f491c89fcc0, create_fk=false) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:12339
      #13 0x0000556826eb5e72 in ha_innobase::create (this=0x7f4898025358, name=0x7f489803af50 "test/t4", form=0x7f4898020bd0, create_info=0x7f491c8a01e0, file_per_table=true, trx=0x7f491c93a2a0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:12657
      #14 0x0000556826ea31b3 in ha_innobase::truncate (this=0x7f4898025358) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:13329
      #15 0x0000556826b7e5f1 in handler::ha_truncate (this=0x7f4898025358) at /data/src/10.3/sql/handler.cc:4388
      #16 0x0000556826d48a50 in Sql_cmd_truncate_table::handler_truncate (this=0x7f4898014078, thd=0x7f4898000b00, table_ref=0x7f4898013a30, is_tmp_table=false) at /data/src/10.3/sql/sql_truncate.cc:242
      #17 0x0000556826d49157 in Sql_cmd_truncate_table::truncate_table (this=0x7f4898014078, thd=0x7f4898000b00, table_ref=0x7f4898013a30) at /data/src/10.3/sql/sql_truncate.cc:448
      #18 0x0000556826d492dc in Sql_cmd_truncate_table::execute (this=0x7f4898014078, thd=0x7f4898000b00) at /data/src/10.3/sql/sql_truncate.cc:504
      #19 0x00005568268824ca in mysql_execute_command (thd=0x7f4898000b00) at /data/src/10.3/sql/sql_parse.cc:6285
      #20 0x000055682688756f in mysql_parse (thd=0x7f4898000b00, rawbuf=0x7f4898013958 "TRUNCATE test.t4", length=16, parser_state=0x7f491c8a1640, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
      #21 0x000055682687483e in dispatch_command (command=COM_QUERY, thd=0x7f4898000b00, packet=0x7f489801ba41 "TRUNCATE test.t4", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1857
      #22 0x0000556826873228 in do_command (thd=0x7f4898000b00) at /data/src/10.3/sql/sql_parse.cc:1403
      #23 0x00005568269dbec1 in do_handle_one_connection (connect=0x55682be0cb80) at /data/src/10.3/sql/sql_connect.cc:1402
      #24 0x00005568269dbc45 in handle_one_connection (arg=0x55682be0cb80) at /data/src/10.3/sql/sql_connect.cc:1308
      #25 0x00007f4921d25494 in start_thread (arg=0x7f491c8a2700) at pthread_create.c:333
      #26 0x00007f491fef393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      To reproduce,

      • download and upack the datadir from ftp://perro.askmonty.org/public/jira/mdev19173-data.tar.gz
      • start the server on it with

        --file-key-management --file-key-management-filename=`pwd`/mysql-test/std_data/keys.txt --plugin-load-add=file_key_management.so --innodb-encrypt-tables --innodb-encrypt-log --innodb-encryption-threads=4 --aria-encrypt-tables=1 --encrypt-tmp-disk-tables=1 --encrypt-binlog --innodb-page-size=4K --innodb-compression-algorithm=none --loose-innodb-file-format=Barracuda --loose-innodb-file-per-table=1 --loose-max-statement-time=20 --loose-lock-wait-timeout=20 --loose-innodb-lock-wait-timeout=10 --loose-innodb_log_compressed_pages=on
        

        (check if the path to keys.txt in this form works for you)

      • (optionally) run mysql_upgrade
      • run

        TRUNCATE test.t4;
        

      The data directory was created with 10.1.38 release server.

      Attachments

        Activity

          People

            marko Marko Mäkelä
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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