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

Upgrade from 10.0 fails on assertion `!is_user_rec || n >= index->n_core_fields || n >= rec_offs_n_fields(offsets)' failed in rec_offs_make_valid

    Details

      Description

      In MDEV-14022 we had an assertion failure upon 10.3 startup on the 10.0 directory. Now it starts, but fails upon further mysql_upgrade, specifically on

      alter table mysql.innodb_index_stats modify last_update timestamp not null default current_timestamp on update current_timestamp
      

      The data directory is the same, https://jira.mariadb.org/secure/attachment/44299/data-10.0.tar.gz

      Unpack, start 10.3 server and either run mysql_upgrade or execute ALTER above.

      10.3 f3ad3bbe7704

      2017-10-12 21:04:03 9 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_stats` is INT UNSIGNED NOT NULL but should be BINARY(4) NOT NULL (type mismatch).
      mysqld: /data/src/10.3/storage/innobase/rem/rem0rec.cc:484: void rec_offs_make_valid(const rec_t*, const dict_index_t*, bool, ulint*): Assertion `!is_user_rec || n >= index->n_core_fields || n >= rec_offs_n_fields(offsets)' failed.
      171012 21:04:03 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fd920cb9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005589d6fd1120 in rec_offs_make_valid (rec=0x7fd8b003ef47 "", index=0x5589db13d308, leaf=true, offsets=0x7fd92010ddb0) at /data/src/10.3/storage/innobase/rem/rem0rec.cc:483
      #9  0x00005589d7049d05 in row_build_low (type=1, index=0x5589db13d308, rec=0x7fd8fc010279 "", offsets=0x7fd92010ddb0, col_table=0x0, add_cols=0x0, add_v=0x0, col_map=0x0, ext=0x0, heap=0x7fd8b003eeb0) at /data/src/10.3/storage/innobase/row/row0row.cc:439
      #10 0x00005589d704a3f1 in row_build (type=1, index=0x5589db13d308, rec=0x7fd8fc010279 "", offsets=0x7fd92010ddb0, col_table=0x0, add_cols=0x0, col_map=0x0, ext=0x0, heap=0x7fd8b003eeb0) at /data/src/10.3/storage/innobase/row/row0row.cc:608
      #11 0x00005589d707f674 in row_upd_store_row (node=0x7fd8b0048238, thd=0x7fd8b0000b00, mysql_table=0x0) at /data/src/10.3/storage/innobase/row/row0upd.cc:2218
      #12 0x00005589d7081f7e in row_upd_del_mark_clust_rec (node=0x7fd8b0048238, index=0x5589db13d308, offsets=0x7fd92010e340, thr=0x7fd8b004bd58, referenced=0, foreign=0, mtr=0x7fd92010e660) at /data/src/10.3/storage/innobase/row/row0upd.cc:2973
      #13 0x00005589d70829f9 in row_upd_clust_step (node=0x7fd8b0048238, thr=0x7fd8b004bd58) at /data/src/10.3/storage/innobase/row/row0upd.cc:3161
      #14 0x00005589d7082f00 in row_upd (node=0x7fd8b0048238, thr=0x7fd8b004bd58) at /data/src/10.3/storage/innobase/row/row0upd.cc:3278
      #15 0x00005589d70833f7 in row_upd_step (thr=0x7fd8b004bd58) at /data/src/10.3/storage/innobase/row/row0upd.cc:3422
      #16 0x00005589d6fc569d in que_thr_step (thr=0x7fd8b004bd58) at /data/src/10.3/storage/innobase/que/que0que.cc:1036
      #17 0x00005589d6fc59a5 in que_run_threads_low (thr=0x7fd8b004bd58) at /data/src/10.3/storage/innobase/que/que0que.cc:1116
      #18 0x00005589d6fc5b87 in que_run_threads (thr=0x7fd8b004bd58) at /data/src/10.3/storage/innobase/que/que0que.cc:1156
      #19 0x00005589d6fc5e28 in que_eval_sql (info=0x7fd8b000c788, sql=0x7fd8b002e288 "PROCEDURE DROP_TABLE_PROC () IS\nsys_foreign_id CHAR;\ntable_id CHAR;\nindex_id CHAR;\nforeign_id CHAR;\nspace_id INT;\nfound INT;\nDECLARE CURSOR cur_fk IS\nSELECT ID FROM SYS_FOREIGN\nWHERE FOR_NAME = :table"..., reserve_dict_mutex=0, trx=0x7fd90b3fd0d8) at /data/src/10.3/storage/innobase/que/que0que.cc:1233
      #20 0x00005589d70224da in row_drop_table_for_mysql (name=0x7fd92010fa70 "mysql/#sql2-95a-9", trx=0x7fd90b3fd0d8, drop_db=false, create_failed=0, nonatomic=true) at /data/src/10.3/storage/innobase/row/row0mysql.cc:3973
      #21 0x00005589d6eccb8d in ha_innobase::delete_table (this=0x7fd8b0016e58, name=0x7fd920111240 "./mysql/#sql2-95a-9") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:13385
      #22 0x00005589d6b9ff46 in handler::ha_delete_table (this=0x7fd8b0016e58, name=0x7fd920111240 "./mysql/#sql2-95a-9") at /data/src/10.3/sql/handler.cc:4358
      #23 0x00005589d6b9a2ce in ha_delete_table (thd=0x7fd8b0000b00, table_type=0x5589da32d0f0, path=0x7fd920111240 "./mysql/#sql2-95a-9", db=0x7fd8b00136a0 "mysql", alias=0x7fd920111b90 "#sql2-95a-9", generate_warning=false) at /data/src/10.3/sql/handler.cc:2359
      #24 0x00005589d699ae70 in quick_rm_table (thd=0x7fd8b0000b00, base=0x5589da32d0f0, db=0x7fd8b00136a0 "mysql", table_name=0x7fd920111b90 "#sql2-95a-9", flags=3, table_path=0x0) at /data/src/10.3/sql/sql_table.cc:2742
      #25 0x00005589d69acea6 in mysql_alter_table (thd=0x7fd8b0000b00, new_db=0x7fd8b00136a0 "mysql", new_name=0x0, create_info=0x7fd920112db0, table_list=0x7fd8b0013700, alter_info=0x7fd920112d00, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9485
      #26 0x00005589d6a2ae7b in Sql_cmd_alter_table::execute (this=0x7fd8b0014048, thd=0x7fd8b0000b00) at /data/src/10.3/sql/sql_alter.cc:331
      #27 0x00005589d68de172 in mysql_execute_command (thd=0x7fd8b0000b00) at /data/src/10.3/sql/sql_parse.cc:6236
      #28 0x00005589d68e2a1c in mysql_parse (thd=0x7fd8b0000b00, rawbuf=0x7fd8b0013528 "alter table mysql.innodb_index_stats modify last_update timestamp not null default current_timestamp on update current_timestamp", length=128, parser_state=0x7fd920114660, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7921
      #29 0x00005589d68d01bd in dispatch_command (command=COM_QUERY, thd=0x7fd8b0000b00, packet=0x7fd8b001b751 "alter table mysql.innodb_index_stats modify last_update timestamp not null default current_timestamp on update current_timestamp", packet_length=128, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1819
      #30 0x00005589d68cec1b in do_command (thd=0x7fd8b0000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #31 0x00005589d6a259f4 in do_handle_one_connection (connect=0x5589dae37df0) at /data/src/10.3/sql/sql_connect.cc:1418
      #32 0x00005589d6a25781 in handle_one_connection (arg=0x5589dae37df0) at /data/src/10.3/sql/sql_connect.cc:1324
      #33 0x00007fd922bfe494 in start_thread (arg=0x7fd920115700) at pthread_create.c:333
      #34 0x00007fd920d7693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marko Marko Mäkelä
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: