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

Assertion `m_extra_cache' failed in ha_partition::late_extra_cache

    XMLWordPrintable

    Details

      Description

      --source include/have_partition.inc
       
      CREATE TABLE t1 (id int, a varchar(8)) WITH SYSTEM VERSIONING PARTITION BY key (id) PARTITIONS 2;
      INSERT INTO t1 VALUES  (1,'foo'),(2,'bar');
       
      CREATE TABLE t2 (b INT);
      INSERT INTO t2 VALUES (1),(2);
       
      UPDATE t1, t2 SET a = 1;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      10.3 c4ed1bee

      mysqld: /data/src/10.3/sql/ha_partition.cc:9230: void ha_partition::late_extra_cache(uint): Assertion `m_extra_cache' failed.
      191205 13:40:05 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc66b0a5f12 in __GI___assert_fail (assertion=0x5570e4e2737c "m_extra_cache", file=0x5570e4e24740 "/data/src/10.3/sql/ha_partition.cc", line=9230, function=0x5570e4e29340 <ha_partition::late_extra_cache(unsigned int)::__PRETTY_FUNCTION__> "void ha_partition::late_extra_cache(uint)") at assert.c:101
      #8  0x00005570e49c405a in ha_partition::late_extra_cache (this=0x7fc654097ab8, partition_id=1) at /data/src/10.3/sql/ha_partition.cc:9230
      #9  0x00005570e49b9032 in ha_partition::rnd_next (this=0x7fc654097ab8, buf=0x7fc654097678 "\374\001") at /data/src/10.3/sql/ha_partition.cc:5111
      #10 0x00005570e4192aca in handler::ha_rnd_next (this=0x7fc654097ab8, buf=0x7fc654097678 "\374\001") at /data/src/10.3/sql/handler.cc:2840
      #11 0x00005570e43244f4 in rr_sequential (info=0x7fc654016860) at /data/src/10.3/sql/records.cc:477
      #12 0x00005570e3dd5405 in READ_RECORD::read_record (this=0x7fc654016860) at /data/src/10.3/sql/records.h:69
      #13 0x00005570e3eee442 in sub_select (join=0x7fc654013db0, join_tab=0x7fc654016798, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19584
      #14 0x00005570e3eed803 in do_select (join=0x7fc654013db0, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19105
      #15 0x00005570e3ec49fb in JOIN::exec_inner (this=0x7fc654013db0) at /data/src/10.3/sql/sql_select.cc:4079
      #16 0x00005570e3ec3dce in JOIN::exec (this=0x7fc654013db0) at /data/src/10.3/sql/sql_select.cc:3873
      #17 0x00005570e3ec50df in mysql_select (thd=0x7fc654000af0, tables=0x7fc6540128f0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=1342177408, result=0x7fc654013868, unit=0x7fc6540049c0, select_lex=0x7fc654005148) at /data/src/10.3/sql/sql_select.cc:4278
      #18 0x00005570e3f7c228 in mysql_multi_update (thd=0x7fc654000af0, table_list=0x7fc6540128f0, fields=0x7fc654005270, values=0x7fc654005778, conds=0x0, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7fc6540049c0, select_lex=0x7fc654005148, result=0x7fc6652a3fd0) at /data/src/10.3/sql/sql_update.cc:1799
      #19 0x00005570e3e768fd in mysql_execute_command (thd=0x7fc654000af0) at /data/src/10.3/sql/sql_parse.cc:4370
      #20 0x00005570e3e825e3 in mysql_parse (thd=0x7fc654000af0, rawbuf=0x7fc654012818 "UPDATE t1, t2 SET a = 1", length=23, parser_state=0x7fc6652a45e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7818
      #21 0x00005570e3e6f12f in dispatch_command (command=COM_QUERY, thd=0x7fc654000af0, packet=0x7fc6541234b1 "UPDATE t1, t2 SET a = 1", packet_length=23, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #22 0x00005570e3e6da77 in do_command (thd=0x7fc654000af0) at /data/src/10.3/sql/sql_parse.cc:1401
      #23 0x00005570e3fe4ea8 in do_handle_one_connection (connect=0x5570e77d37f0) at /data/src/10.3/sql/sql_connect.cc:1403
      #24 0x00005570e3fe4c0a in handle_one_connection (arg=0x5570e77d37f0) at /data/src/10.3/sql/sql_connect.cc:1308
      #25 0x00005570e499283c in pfs_spawn_thread (arg=0x5570e771ddd0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #26 0x00007fc66cc1b4a4 in start_thread (arg=0x7fc6652a5700) at pthread_create.c:456
      #27 0x00007fc66b162d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3-10.5.
      No obvious immediate effect on a non-debug build.

      The failure appeared recently on 10.3 branch, I didn't bisect for the exact revision.

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: