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

Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type == 1' failed upon REBUILD PARTITION

    XMLWordPrintable

    Details

      Description

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB PARTITION BY LIST (a) (PARTITION p0 VALUES IN (8), PARTITION p1 VALUES IN (4,7,0), PARTITION p2 VALUES IN (9,2,5), PARTITION p3 VALUES IN (3,1,6));
      INSERT INTO t1 VALUES (8),(5),(4),(0);
      ALTER TABLE t1 DROP a, ADD a INT NOT NULL DEFAULT 0;
      ALTER TABLE t1 REBUILD PARTITION p0;
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 18af13b8 debug

      mysqld: /data/src/10.4/sql/handler.cc:6658: int handler::ha_write_row(const uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type == 1' failed.
      190904 22:27:19 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f52c06fcf12 in __GI___assert_fail (assertion=0x55f6434545c0 "table_share->tmp_table != NO_TMP_TABLE || m_lock_type == 1", file=0x55f643452c32 "/data/src/10.4/sql/handler.cc", line=6658, function=0x55f643457440 <handler::ha_write_row(unsigned char const*)::__PRETTY_FUNCTION__> "int handler::ha_write_row(const uchar*)") at assert.c:101
      #8  0x000055f642911004 in handler::ha_write_row (this=0x7f526814f908, buf=0x7f5268079998 "\377") at /data/src/10.4/sql/handler.cc:6657
      #9  0x000055f6431742da in ha_partition::copy_partitions (this=0x7f526800b638, copied=0x7f52b9ac95c8, deleted=0x7f52b9ac95d0) at /data/src/10.4/sql/ha_partition.cc:2117
      #10 0x000055f643173fc7 in ha_partition::change_partitions (this=0x7f526800b638, create_info=0x7f52b9acbd10, path=0x7f52b9ac9320 "./test/t1", copied=0x7f52b9ac95c8, deleted=0x7f52b9ac95d0, pack_frm_data=0x0, pack_frm_len=0) at /data/src/10.4/sql/ha_partition.cc:2029
      #11 0x000055f64290b7f4 in handler::ha_change_partitions (this=0x7f526800b638, create_info=0x7f52b9acbd10, path=0x7f52b9ac9320 "./test/t1", copied=0x7f52b9ac95c8, deleted=0x7f52b9ac95d0, pack_frm_data=0x0, pack_frm_len=0) at /data/src/10.4/sql/handler.cc:4785
      #12 0x000055f642ae3531 in mysql_change_partitions (lpt=0x7f52b9ac95c0) at /data/src/10.4/sql/sql_partition.cc:6007
      #13 0x000055f642ae6ca7 in fast_alter_partition_table (thd=0x7f5268000b00, table=0x7f526814e2e0, alter_info=0x7f52b9acbc50, create_info=0x7f52b9acbd10, table_list=0x7f5268013210, db=0x7f52b9acb140, table_name=0x7f52b9acb150) at /data/src/10.4/sql/sql_partition.cc:7372
      #14 0x000055f64268f817 in mysql_alter_table (thd=0x7f5268000b00, new_db=0x7f52680052b8, new_name=0x7f52680056c0, create_info=0x7f52b9acbd10, table_list=0x7f5268013210, alter_info=0x7f52b9acbc50, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9837
      #15 0x000055f642728485 in Sql_cmd_alter_table::execute (this=0x7f52680138e0, thd=0x7f5268000b00) at /data/src/10.4/sql/sql_alter.cc:508
      #16 0x000055f6425a61a3 in mysql_execute_command (thd=0x7f5268000b00) at /data/src/10.4/sql/sql_parse.cc:6099
      #17 0x000055f6425ab8ec in mysql_parse (thd=0x7f5268000b00, rawbuf=0x7f5268013118 "ALTER TABLE t1 REBUILD PARTITION p0", length=35, parser_state=0x7f52b9acd170, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7909
      #18 0x000055f6425968ec in dispatch_command (command=COM_QUERY, thd=0x7f5268000b00, packet=0x7f526819dc31 "ALTER TABLE t1 REBUILD PARTITION p0", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1843
      #19 0x000055f642594f36 in do_command (thd=0x7f5268000b00) at /data/src/10.4/sql/sql_parse.cc:1360
      #20 0x000055f64271ec47 in do_handle_one_connection (connect=0x55f64623ca90) at /data/src/10.4/sql/sql_connect.cc:1412
      #21 0x000055f64271e996 in handle_one_connection (arg=0x55f64623ca90) at /data/src/10.4/sql/sql_connect.cc:1316
      #22 0x000055f643154da3 in pfs_spawn_thread (arg=0x55f6461bb410) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #23 0x00007f52c22714a4 in start_thread (arg=0x7f52b9ace700) at pthread_create.c:456
      #24 0x00007f52c07b9d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      No obvious effect on a non-debug build.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: