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

Wrongly set tablename len while opening the table for purge thread

Details

    Description

      Note: Run with --repeat=N. For me, N=5 has always been enough, but it can vary.

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t1 ( 
        pk SERIAL,
        d DATE,
        vd DATE AS (d) VIRTUAL,
        PRIMARY KEY(pk),
        KEY (vd)
      ) ENGINE=InnoDB PARTITION BY HASH(pk) PARTITIONS 2;
       
      INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14');
      SET sql_mode= '';
      REPLACE INTO t1 SELECT * FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 5e7496e2eaf0

      mysqld: /data/src/10.3/sql/table.h:1949: void TABLE_LIST::init_one_table(const LEX_CSTRING*, const LEX_CSTRING*, const LEX_CSTRING*, thr_lock_type): Assertion `!table_name_arg->str || strlen(table_name_arg->str) == table_name_arg->length' failed.
      180814 23:32:33 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa998e94ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055ef8d9ce98c in TABLE_LIST::init_one_table (this=0x7fa96c00d2f8, db_arg=0x7fa97d7f7fb0, table_name_arg=0x7fa97d7f7fc0, alias_arg=0x0, lock_type_arg=TL_READ) at /data/src/10.3/sql/table.h:1949
      #9  0x000055ef8da40011 in open_purge_table (thd=0x7fa96c000b00, db=0x7fa97d7f80a0 "test", dblen=4, tb=0x7fa97d7f8240 "t1", tblen=7) at /data/src/10.3/sql/sql_class.cc:4666
      #10 0x000055ef8e0c672b in innodb_acquire_mdl (thd=0x7fa96c000b00, table=0x7fa9400a9b08) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20738
      #11 0x000055ef8e0c6926 in innodb_find_table_for_vc (thd=0x7fa96c000b00, table=0x7fa9400a9b08) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20793
      #12 0x000055ef8e0c6e99 in innobase_allocate_row_for_vcol (thd=0x7fa96c000b00, index=0x7fa94007a138, heap=0x7fa97d7f8670, table=0x7fa97d7f8680, record=0x7fa97d7f8688, storage=0x7fa97d7f8678) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20947
      #13 0x000055ef8e272324 in row_vers_build_clust_v_col (row=0x7fa96c0145f0, clust_index=0x7fa940078878, index=0x7fa94007a138, heap=0x7fa96c014520, vcol_info=0x55ef910d0208) at /data/src/10.3/storage/innobase/row/row0vers.cc:465
      #14 0x000055ef8e2734b6 in row_vers_old_has_index_entry (also_curr=true, rec=0x7fa98e95807e "", mtr=0x7fa97d7f8ab0, index=0x7fa94007a138, ientry=0x7fa96c014038, roll_ptr=1407374904066874, trx_id=0, vcol_info=0x55ef910d0208) at /data/src/10.3/storage/innobase/row/row0vers.cc:959
      #15 0x000055ef8e227cfe in row_purge_poss_sec (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038, sec_pcur=0x7fa97d7f9050, sec_mtr=0x7fa97d7f92b0, is_tree=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:346
      #16 0x000055ef8e2289d1 in row_purge_remove_sec_if_poss_leaf (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038) at /data/src/10.3/storage/innobase/row/row0purge.cc:597
      #17 0x000055ef8e228eb9 in row_purge_remove_sec_if_poss (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038) at /data/src/10.3/storage/innobase/row/row0purge.cc:710
      #18 0x000055ef8e2290c6 in row_purge_del_mark (node=0x55ef910d0068) at /data/src/10.3/storage/innobase/row/row0purge.cc:784
      #19 0x000055ef8e22a5df in row_purge_record_func (node=0x55ef910d0068, undo_rec=0x55ef910d0618 "", thr=0x55ef910cfe98, updated_extern=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:1178
      #20 0x000055ef8e22a91c in row_purge (node=0x55ef910d0068, undo_rec=0x55ef910d0618 "", thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/row/row0purge.cc:1245
      #21 0x000055ef8e22acca in row_purge_step (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/row/row0purge.cc:1331
      #22 0x000055ef8e1ae79c in que_thr_step (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1046
      #23 0x000055ef8e1ae9cf in que_run_threads_low (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1108
      #24 0x000055ef8e1aebc0 in que_run_threads (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1148
      #25 0x000055ef8e27bc01 in srv_task_execute () at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2437
      #26 0x000055ef8e27bda6 in srv_worker_thread (arg=0x0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2485
      #27 0x00007fa99ab6b494 in start_thread (arg=0x7fa97d7fa700) at pthread_create.c:333
      #28 0x00007fa998f5193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Not reproducible with the provided test case on 10.2.
      No visible (immediate) effect on a non-debug build.

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Labels affects-tests
          thiru Thirunarayanan Balathandayuthapani made changes -
          Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
          thiru Thirunarayanan Balathandayuthapani made changes -
          Summary Assertion `!table_name_arg->str || strlen(table_name_arg->str) == table_name_arg->length' failed in TABLE_LIST::init_one_table Wrongly set tablename len while opening the table
          thiru Thirunarayanan Balathandayuthapani made changes -
          Summary Wrongly set tablename len while opening the table Wrongly set tablename len while opening the table for purge thread
          thiru Thirunarayanan Balathandayuthapani made changes -
          issue.field.resolutiondate 2018-10-08 15:38:16.0 2018-10-08 15:38:16.976
          thiru Thirunarayanan Balathandayuthapani made changes -
          Fix Version/s 10.3.11 [ 23141 ]
          Fix Version/s 10.3 [ 22126 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          elenst Elena Stepanova made changes -
          Description _Note: Run with {{--repeat=N}}. For me, {{N=5}} has always been enough, but it can vary._

          {code:sql}
          --source include/have_innodb.inc
          --source include/have_partition.inc

          CREATE TABLE t1 (
            pk SERIAL,
            d DATE,
            vd DATE AS (d) VIRTUAL,
            PRIMARY KEY(pk),
            KEY (vd)
          ) ENGINE=InnoDB PARTITION BY HASH(pk) PARTITIONS 2;

          INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14');
          SET sql_mode= '';
          REPLACE INTO t1 SELECT * FROM t1;

          # Cleanup
          DROP TABLE t1;
          {code}

          {noformat:title=10.3 5e7496e2eaf0}
          mysqld: /data/src/10.3/sql/table.h:1949: void TABLE_LIST::init_one_table(const LEX_CSTRING*, const LEX_CSTRING*, const LEX_CSTRING*, thr_lock_type): Assertion `!table_name_arg->str || strlen(table_name_arg->str) == table_name_arg->length' failed.
          180814 23:32:33 [ERROR] mysqld got signal 6 ;

          #7 0x00007fa998e94ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
          #8 0x000055ef8d9ce98c in TABLE_LIST::init_one_table (this=0x7fa96c00d2f8, db_arg=0x7fa97d7f7fb0, table_name_arg=0x7fa97d7f7fc0, alias_arg=0x0, lock_type_arg=TL_READ) at /data/src/10.3/sql/table.h:1949
          #9 0x000055ef8da40011 in open_purge_table (thd=0x7fa96c000b00, db=0x7fa97d7f80a0 "test", dblen=4, tb=0x7fa97d7f8240 "t1", tblen=7) at /data/src/10.3/sql/sql_class.cc:4666
          #10 0x000055ef8e0c672b in innodb_acquire_mdl (thd=0x7fa96c000b00, table=0x7fa9400a9b08) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20738
          #11 0x000055ef8e0c6926 in innodb_find_table_for_vc (thd=0x7fa96c000b00, table=0x7fa9400a9b08) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20793
          #12 0x000055ef8e0c6e99 in innobase_allocate_row_for_vcol (thd=0x7fa96c000b00, index=0x7fa94007a138, heap=0x7fa97d7f8670, table=0x7fa97d7f8680, record=0x7fa97d7f8688, storage=0x7fa97d7f8678) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20947
          #13 0x000055ef8e272324 in row_vers_build_clust_v_col (row=0x7fa96c0145f0, clust_index=0x7fa940078878, index=0x7fa94007a138, heap=0x7fa96c014520, vcol_info=0x55ef910d0208) at /data/src/10.3/storage/innobase/row/row0vers.cc:465
          #14 0x000055ef8e2734b6 in row_vers_old_has_index_entry (also_curr=true, rec=0x7fa98e95807e "", mtr=0x7fa97d7f8ab0, index=0x7fa94007a138, ientry=0x7fa96c014038, roll_ptr=1407374904066874, trx_id=0, vcol_info=0x55ef910d0208) at /data/src/10.3/storage/innobase/row/row0vers.cc:959
          #15 0x000055ef8e227cfe in row_purge_poss_sec (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038, sec_pcur=0x7fa97d7f9050, sec_mtr=0x7fa97d7f92b0, is_tree=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:346
          #16 0x000055ef8e2289d1 in row_purge_remove_sec_if_poss_leaf (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038) at /data/src/10.3/storage/innobase/row/row0purge.cc:597
          #17 0x000055ef8e228eb9 in row_purge_remove_sec_if_poss (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038) at /data/src/10.3/storage/innobase/row/row0purge.cc:710
          #18 0x000055ef8e2290c6 in row_purge_del_mark (node=0x55ef910d0068) at /data/src/10.3/storage/innobase/row/row0purge.cc:784
          #19 0x000055ef8e22a5df in row_purge_record_func (node=0x55ef910d0068, undo_rec=0x55ef910d0618 "", thr=0x55ef910cfe98, updated_extern=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:1178
          #20 0x000055ef8e22a91c in row_purge (node=0x55ef910d0068, undo_rec=0x55ef910d0618 "", thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/row/row0purge.cc:1245
          #21 0x000055ef8e22acca in row_purge_step (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/row/row0purge.cc:1331
          #22 0x000055ef8e1ae79c in que_thr_step (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1046
          #23 0x000055ef8e1ae9cf in que_run_threads_low (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1108
          #24 0x000055ef8e1aebc0 in que_run_threads (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1148
          #25 0x000055ef8e27bc01 in srv_task_execute () at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2437
          #26 0x000055ef8e27bda6 in srv_worker_thread (arg=0x0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2485
          #27 0x00007fa99ab6b494 in start_thread (arg=0x7fa97d7fa700) at pthread_create.c:333
          #28 0x00007fa998f5193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
          {noformat}
          _Note: Run with {{--repeat=N}}. For me, {{N=5}} has always been enough, but it can vary._

          {code:sql}
          --source include/have_innodb.inc
          --source include/have_partition.inc

          CREATE TABLE t1 (
            pk SERIAL,
            d DATE,
            vd DATE AS (d) VIRTUAL,
            PRIMARY KEY(pk),
            KEY (vd)
          ) ENGINE=InnoDB PARTITION BY HASH(pk) PARTITIONS 2;

          INSERT IGNORE INTO t1 (d) VALUES ('2015-04-14');
          SET sql_mode= '';
          REPLACE INTO t1 SELECT * FROM t1;

          # Cleanup
          DROP TABLE t1;
          {code}

          {noformat:title=10.3 5e7496e2eaf0}
          mysqld: /data/src/10.3/sql/table.h:1949: void TABLE_LIST::init_one_table(const LEX_CSTRING*, const LEX_CSTRING*, const LEX_CSTRING*, thr_lock_type): Assertion `!table_name_arg->str || strlen(table_name_arg->str) == table_name_arg->length' failed.
          180814 23:32:33 [ERROR] mysqld got signal 6 ;

          #7 0x00007fa998e94ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
          #8 0x000055ef8d9ce98c in TABLE_LIST::init_one_table (this=0x7fa96c00d2f8, db_arg=0x7fa97d7f7fb0, table_name_arg=0x7fa97d7f7fc0, alias_arg=0x0, lock_type_arg=TL_READ) at /data/src/10.3/sql/table.h:1949
          #9 0x000055ef8da40011 in open_purge_table (thd=0x7fa96c000b00, db=0x7fa97d7f80a0 "test", dblen=4, tb=0x7fa97d7f8240 "t1", tblen=7) at /data/src/10.3/sql/sql_class.cc:4666
          #10 0x000055ef8e0c672b in innodb_acquire_mdl (thd=0x7fa96c000b00, table=0x7fa9400a9b08) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20738
          #11 0x000055ef8e0c6926 in innodb_find_table_for_vc (thd=0x7fa96c000b00, table=0x7fa9400a9b08) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20793
          #12 0x000055ef8e0c6e99 in innobase_allocate_row_for_vcol (thd=0x7fa96c000b00, index=0x7fa94007a138, heap=0x7fa97d7f8670, table=0x7fa97d7f8680, record=0x7fa97d7f8688, storage=0x7fa97d7f8678) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:20947
          #13 0x000055ef8e272324 in row_vers_build_clust_v_col (row=0x7fa96c0145f0, clust_index=0x7fa940078878, index=0x7fa94007a138, heap=0x7fa96c014520, vcol_info=0x55ef910d0208) at /data/src/10.3/storage/innobase/row/row0vers.cc:465
          #14 0x000055ef8e2734b6 in row_vers_old_has_index_entry (also_curr=true, rec=0x7fa98e95807e "", mtr=0x7fa97d7f8ab0, index=0x7fa94007a138, ientry=0x7fa96c014038, roll_ptr=1407374904066874, trx_id=0, vcol_info=0x55ef910d0208) at /data/src/10.3/storage/innobase/row/row0vers.cc:959
          #15 0x000055ef8e227cfe in row_purge_poss_sec (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038, sec_pcur=0x7fa97d7f9050, sec_mtr=0x7fa97d7f92b0, is_tree=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:346
          #16 0x000055ef8e2289d1 in row_purge_remove_sec_if_poss_leaf (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038) at /data/src/10.3/storage/innobase/row/row0purge.cc:597
          #17 0x000055ef8e228eb9 in row_purge_remove_sec_if_poss (node=0x55ef910d0068, index=0x7fa94007a138, entry=0x7fa96c014038) at /data/src/10.3/storage/innobase/row/row0purge.cc:710
          #18 0x000055ef8e2290c6 in row_purge_del_mark (node=0x55ef910d0068) at /data/src/10.3/storage/innobase/row/row0purge.cc:784
          #19 0x000055ef8e22a5df in row_purge_record_func (node=0x55ef910d0068, undo_rec=0x55ef910d0618 "", thr=0x55ef910cfe98, updated_extern=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:1178
          #20 0x000055ef8e22a91c in row_purge (node=0x55ef910d0068, undo_rec=0x55ef910d0618 "", thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/row/row0purge.cc:1245
          #21 0x000055ef8e22acca in row_purge_step (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/row/row0purge.cc:1331
          #22 0x000055ef8e1ae79c in que_thr_step (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1046
          #23 0x000055ef8e1ae9cf in que_run_threads_low (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1108
          #24 0x000055ef8e1aebc0 in que_run_threads (thr=0x55ef910cfe98) at /data/src/10.3/storage/innobase/que/que0que.cc:1148
          #25 0x000055ef8e27bc01 in srv_task_execute () at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2437
          #26 0x000055ef8e27bda6 in srv_worker_thread (arg=0x0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2485
          #27 0x00007fa99ab6b494 in start_thread (arg=0x7fa97d7fa700) at pthread_create.c:333
          #28 0x00007fa998f5193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
          {noformat}

          Not reproducible with the provided test case on 10.2.
          No visible (immediate) effect on a non-debug build.
          thiru Thirunarayanan Balathandayuthapani made changes -
          Fix Version/s 10.2.19 [ 23207 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 88910 ] MariaDB v4 [ 154797 ]

          People

            thiru Thirunarayanan Balathandayuthapani
            elenst Elena Stepanova
            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.