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

PK on inplace-enlarged type fails

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4.2
    • N/A
    • None
    • Ubuntu 17.10 but most probably unimportant

    Description

      mysqld: storage/innobase/trx/trx0sys.cc:62: static void ReadView::check_trx_id_sanity(trx_id_t, const table_name_t&): Assertion `0' failed.

      The problem does not show up on actual 
          10.4   commit 2465d3e00b2f18c7d4967f9bb10438883682787d 2019-01-01
       
      The problem was found during RQG testing on binaries compiled with ASAN
      based on bb-10.4-MDEV-15563
         last commit    d96b94d1ab6878bea98f0f6dc005cfd1e2d1f8e5  2019-01-02
                Disable a badly written test  2019-01-02
         previous commit b91879bd8fc10344f10dd3e648338c5535de02f4  2018-12-11
                MDEV-15563 Case 4 prototype: UNSIGNED -> bigger signed
       
      ts_5.test
      -------------
      --source include/have_innodb.inc
      CREATE TABLE t1 (col1 INT, col_int INTEGER) ENGINE = InnoDB ROW_FORMAT = Redundant ;
      INSERT INTO t1 (col1, col_int) VALUES ( 0, 0 ) ;
      ALTER TABLE t1 MODIFY col_int BIGINT ;
      ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS ( col_int ) , LOCK = EXCLUSIVE, ALGORITHM = INPLACE ;
      INSERT INTO t1 (col1, col_int) VALUES ( 1, 1 ) ;
      CHECK TABLE t1;
       
      SHOW PROCESSLIST;
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      CREATE TABLE t1 (col1 INT, col_int INTEGER) ENGINE = InnoDB ROW_FORMAT = Redundant ;
      INSERT INTO t1 (col1, col_int) VALUES ( 0, 0 ) ;
      ALTER TABLE t1 MODIFY col_int BIGINT ;
      ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS ( col_int ) , LOCK = EXCLUSIVE, ALGORITHM = INPLACE ;
      INSERT INTO t1 (col1, col_int) VALUES ( 1, 1 ) ;
      CHECK TABLE t1;
      main.ts_5 'innodb'                       [ fail ]
              Test ended at 2019-01-03 11:44:05
       
      CURRENT_TEST: main.ts_5
      mysqltest: At line 8: query 'CHECK TABLE t1' failed: 2013: Lost connection to MySQL server during query
      ...
      Version: '10.4.2-MariaDB-debug-log'  socket: 'bld_asan/mysql-test/var/tmp/mysqld.1.sock'  port: 16000  Source distribution
      2019-01-03 11:44:04 9 [Warning] InnoDB: A transaction id in a record of table `test`.`t1` is newer than the system-wide maximum.
      mysqld: storage/innobase/trx/trx0sys.cc:62: static void ReadView::check_trx_id_sanity(trx_id_t, const table_name_t&): Assertion `0' failed.
      190103 11:44:04 [ERROR] mysqld got signal 6 ;
      ...
      Query (0x62b000000220): CHECK TABLE t1
      Connection ID (thread ID): 9
      Status: NOT_KILLED
      ...
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007ff83416cf5d in __GI_abort () at abort.c:90
      #6  0x00007ff834162f17 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5653ba59e040 "0", file=file@entry=0x5653ba59dfc0 "storage/innobase/trx/trx0sys.cc", line=line@entry=62, function=function@entry=0x5653ba59f1e0 <ReadView::check_trx_id_sanity(unsigned long, table_name_t const&)::__PRETTY_FUNCTION__> "static void ReadView::check_trx_id_sanity(trx_id_t, const table_name_t&)") at assert.c:92
      #7  0x00007ff834162fc2 in __GI___assert_fail (assertion=0x5653ba59e040 "0", file=0x5653ba59dfc0 "storage/innobase/trx/trx0sys.cc", line=62, function=0x5653ba59f1e0 <ReadView::check_trx_id_sanity(unsigned long, table_name_t const&)::__PRETTY_FUNCTION__> "static void ReadView::check_trx_id_sanity(trx_id_t, const table_name_t&)") at assert.c:101
      #8  0x00005653b94a4595 in ReadView::check_trx_id_sanity (id=2147483648, name=...) at storage/innobase/trx/trx0sys.cc:62
      #9  0x00005653b91aa00e in ReadView::changes_visible (this=0x7ff82af0f998, id=2147483648, name=...) at storage/innobase/include/read0types.h:220
      #10 0x00005653b9180b84 in lock_clust_rec_cons_read_sees (rec=0x7ff82ab9c087 "\200", index=0x61700004a008, offsets=0x7ff81e38dd20, view=0x7ff82af0f998) at storage/innobase/lock/lock0lock.cc:403
      #11 0x00005653b93c3357 in row_search_mvcc (buf=0x6290002e4200 '\276' <repeats 200 times>..., mode=PAGE_CUR_G, prebuilt=0x620000014108, match_mode=0, direction=0) at storage/innobase/row/row0sel.cc:5111
      #12 0x00005653b93344b0 in row_search_for_mysql (buf=0x6290002e4200 '\276' <repeats 200 times>..., mode=PAGE_CUR_G, prebuilt=0x620000014108, match_mode=0, direction=0) at storage/innobase/include/row0sel.ic:137
      #13 0x00005653b934ff42 in row_scan_index_for_mysql (prebuilt=0x620000014108, index=0x61700004a008, n_rows=0x7ff81e38f5d0) at storage/innobase/row/row0mysql.cc:4721
      #14 0x00005653b9063b36 in ha_innobase::check (this=0x61c0000660a0, thd=0x62a0000de208, check_opt=0x62a0000e3260) at storage/innobase/handler/ha_innodb.cc:14549
      #15 0x00005653b8b01cc4 in handler::ha_check (this=0x61c0000660a0, thd=0x62a0000de208, check_opt=0x62a0000e3260) at sql/handler.cc:4235
      #16 0x00005653b875ab2a in mysql_admin_table (thd=0x62a0000de208, tables=0x62b0000002d8, check_opt=0x62a0000e3260, operator_name=0x5653ba0d0a40 "check", lock_type=TL_READ_NO_INSERT, org_open_for_modify=false, repair_table_use_frm=false, extra_open_options=32, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x5653b8b0187a <handler::ha_check(THD*, st_ha_check_opt*)>, view_operator_func=0x5653b864c7de <view_check(THD*, TABLE_LIST*, st_ha_check_opt*)>) at sql/sql_admin.cc:803
      #17 0x00005653b875fc2c in Sql_cmd_check_table::execute (this=0x62b000000918, thd=0x62a0000de208) at sql/sql_admin.cc:1347
      #18 0x00005653b83aed62 in mysql_execute_command (thd=0x62a0000de208) at sql/sql_parse.cc:6302
      #19 0x00005653b83ba63f in mysql_parse (thd=0x62a0000de208, rawbuf=0x62b000000220 "CHECK TABLE t1", length=14, parser_state=0x7ff81e392dd0, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:8104
      #20 0x00005653b8391a50 in dispatch_command (command=COM_QUERY, thd=0x62a0000de208, packet=0x629000271209 "", packet_length=14, is_com_multi=false, is_next_command=false) at sql/sql_parse.cc:1850
      #21 0x00005653b838e67c in do_command (thd=0x62a0000de208) at sql/sql_parse.cc:1395
      #22 0x00005653b87313d9 in do_handle_one_connection (connect=0x6080000010a8) at sql/sql_connect.cc:1402
      #23 0x00005653b8730ccb in handle_one_connection (arg=0x6080000010a8) at sql/sql_connect.cc:1308
      #24 0x00005653b9c18aa4 in pfs_spawn_thread (arg=0x615000004908) at storage/perfschema/pfs.cc:1862
      #25 0x00007ff834e0e7fc in start_thread (arg=0x7ff81e394700) at pthread_create.c:465
      
      

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              mleich Matthias Leich
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.