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

Assertion failures in ha_partition::set_auto_increment_if_higher upon UPDATE on Aria table

    Details

      Description

      --source include/have_partition.inc
       
      CREATE TABLE t1 (pk INT AUTO_INCREMENT, a INT, KEY(pk)) ENGINE=Aria PARTITION BY HASH(a);
      INSERT INTO t1 VALUES (1,1),(2,2);
      UPDATE t1 SET pk = 0;
       
      # Cleanup
      DROP TABLE t1;
      

      5.5 0955462d

      mysqld: /data/src/5.5/sql/field.cc:3662: virtual longlong Field_long::val_int(): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed.
      190528 19:08:31 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f3b37baae67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5628c79b8140 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))", file=file@entry=0x5628c79b804c "/data/src/5.5/sql/field.cc", line=line@entry=3662, function=function@entry=0x5628c79ba1c0 <Field_long::val_int()::__PRETTY_FUNCTION__> "virtual longlong Field_long::val_int()") at assert.c:92
      #7  0x00007f3b37baaf12 in __GI___assert_fail (assertion=0x5628c79b8140 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))", file=0x5628c79b804c "/data/src/5.5/sql/field.cc", line=3662, function=0x5628c79ba1c0 <Field_long::val_int()::__PRETTY_FUNCTION__> "virtual longlong Field_long::val_int()") at assert.c:101
      #8  0x00005628c73a835b in Field_long::val_int (this=0x7f3b19456fc0) at /data/src/5.5/sql/field.cc:3662
      #9  0x00005628c7896114 in ha_partition::set_auto_increment_if_higher (this=0x7f3b1948f478, field=0x7f3b19456fc0) at /data/src/5.5/sql/ha_partition.h:1007
      #10 0x00005628c788cfa7 in ha_partition::update_row (this=0x7f3b1948f478, old_data=0x7f3b19456f98 "\375\001", new_data=0x7f3b19456f88 "\375") at /data/src/5.5/sql/ha_partition.cc:3771
      #11 0x00005628c73d471b in handler::ha_update_row (this=0x7f3b1948f478, old_data=0x7f3b19456f98 "\375\001", new_data=0x7f3b19456f88 "\375") at /data/src/5.5/sql/handler.cc:5234
      #12 0x00005628c72cef25 in mysql_update (thd=0x7f3b1fea6060, table_list=0x7f3b1959d150, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f3b39615358, updated_return=0x7f3b39615350) at /data/src/5.5/sql/sql_update.cc:764
      #13 0x00005628c721995b in mysql_execute_command (thd=0x7f3b1fea6060) at /data/src/5.5/sql/sql_parse.cc:2837
      #14 0x00005628c7221f01 in mysql_parse (thd=0x7f3b1fea6060, rawbuf=0x7f3b1959d078 "UPDATE t1 SET pk = 0", length=20, parser_state=0x7f3b39615670) at /data/src/5.5/sql/sql_parse.cc:5929
      #15 0x00005628c72157bd in dispatch_command (command=COM_QUERY, thd=0x7f3b1fea6060, packet=0x7f3b237c9061 "UPDATE t1 SET pk = 0", packet_length=20) at /data/src/5.5/sql/sql_parse.cc:1067
      #16 0x00005628c72149cd in do_command (thd=0x7f3b1fea6060) at /data/src/5.5/sql/sql_parse.cc:793
      #17 0x00005628c7319f4b in do_handle_one_connection (thd_arg=0x7f3b1fea6060) at /data/src/5.5/sql/sql_connect.cc:1268
      #18 0x00005628c7319cba in handle_one_connection (arg=0x7f3b1fea6060) at /data/src/5.5/sql/sql_connect.cc:1184
      #19 0x00007f3b392514a4 in start_thread (arg=0x7f3b39616700) at pthread_create.c:456
      #20 0x00007f3b37c67d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Same assertion failure on 10.1.

      10.2 b8b74e14

      mysqld: /data/src/10.2/sql/field.cc:4332: virtual longlong Field_long::val_int(): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed.
      190528 19:10:53 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007ffa04054e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55c97d65ee78 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))", file=file@entry=0x55c97d65ec18 "/data/src/10.2/sql/field.cc", line=line@entry=4332, function=function@entry=0x55c97d661920 <Field_long::val_int()::__PRETTY_FUNCTION__> "virtual longlong Field_long::val_int()") at assert.c:92
      #7  0x00007ffa04054f12 in __GI___assert_fail (assertion=0x55c97d65ee78 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))", file=0x55c97d65ec18 "/data/src/10.2/sql/field.cc", line=4332, function=0x55c97d661920 <Field_long::val_int()::__PRETTY_FUNCTION__> "virtual longlong Field_long::val_int()") at assert.c:101
      #8  0x000055c97cd63f11 in Field_long::val_int (this=0x7ff9a0154128) at /data/src/10.2/sql/field.cc:4332
      #9  0x000055c97d4b45b8 in ha_partition::set_auto_increment_if_higher (this=0x7ff9a00837d8, field=0x7ff9a0154128) at /data/src/10.2/sql/ha_partition.h:1084
      #10 0x000055c97d4a9ac8 in ha_partition::update_row (this=0x7ff9a00837d8, old_data=0x7ff9a0154100 "\375\001", new_data=0x7ff9a01540f0 "\375") at /data/src/10.2/sql/ha_partition.cc:4341
      #11 0x000055c97cd9a763 in handler::ha_update_row (this=0x7ff9a00837d8, old_data=0x7ff9a0154100 "\375\001", new_data=0x7ff9a01540f0 "\375") at /data/src/10.2/sql/handler.cc:6087
      #12 0x000055c97cbffb6b in mysql_update (thd=0x7ff9a0000b00, table_list=0x7ff9a0012320, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7ffa017af8c0, updated_return=0x7ffa017af970) at /data/src/10.2/sql/sql_update.cc:818
      #13 0x000055c97cb12e78 in mysql_execute_command (thd=0x7ff9a0000b00) at /data/src/10.2/sql/sql_parse.cc:4290
      #14 0x000055c97cb1ecba in mysql_parse (thd=0x7ff9a0000b00, rawbuf=0x7ff9a0012248 "UPDATE t1 SET pk = 0", length=20, parser_state=0x7ffa017b0250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8020
      #15 0x000055c97cb0c50e in dispatch_command (command=COM_QUERY, thd=0x7ff9a0000b00, packet=0x7ff9a0066eb1 "UPDATE t1 SET pk = 0", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1833
      #16 0x000055c97cb0ae62 in do_command (thd=0x7ff9a0000b00) at /data/src/10.2/sql/sql_parse.cc:1386
      #17 0x000055c97cc5db38 in do_handle_one_connection (connect=0x55c97fdb70f0) at /data/src/10.2/sql/sql_connect.cc:1335
      #18 0x000055c97cc5d8b8 in handle_one_connection (arg=0x55c97fdb70f0) at /data/src/10.2/sql/sql_connect.cc:1241
      #19 0x00007ffa05bc94a4 in start_thread (arg=0x7ffa017b1700) at pthread_create.c:456
      #20 0x00007ffa04111d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Same assertion failure on 10.3.

      10.4 7d3a759d

      mysqld: /data/src/10.4/sql/field.cc:4257: virtual longlong Field_long::val_int(): Assertion `marked_for_read()' failed.
      190528 19:12:49 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fcab7701f12 in __GI___assert_fail (assertion=0x55a6e4d5cf90 "marked_for_read()", file=0x55a6e4d5cda4 "/data/src/10.4/sql/field.cc", line=4257, function=0x55a6e4d5f4c0 <Field_long::val_int()::__PRETTY_FUNCTION__> "virtual longlong Field_long::val_int()") at assert.c:101
      #8  0x000055a6e42ecec6 in Field_long::val_int (this=0x7fcaa0133808) at /data/src/10.4/sql/field.cc:4257
      #9  0x000055a6e4ab1b12 in ha_partition::set_auto_increment_if_higher (this=0x7fcaa012eb78, field=0x7fcaa0133808) at /data/src/10.4/sql/ha_partition.h:1302
      #10 0x000055a6e4a9ed81 in ha_partition::update_row (this=0x7fcaa012eb78, old_data=0x7fcaa01337e0 "\375\001", new_data=0x7fcaa01337d0 "\375") at /data/src/10.4/sql/ha_partition.cc:4460
      #11 0x000055a6e432ce1b in handler::ha_update_row (this=0x7fcaa012eb78, old_data=0x7fcaa01337e0 "\375\001", new_data=0x7fcaa01337d0 "\375") at /data/src/10.4/sql/handler.cc:6699
      #12 0x000055a6e40e91d7 in mysql_update (thd=0x7fcaa0000b00, table_list=0x7fcaa00131e0, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7fcab18d2850, updated_return=0x7fcab18d2910) at /data/src/10.4/sql/sql_update.cc:1040
      #13 0x000055a6e3fe5f7d in mysql_execute_command (thd=0x7fcaa0000b00) at /data/src/10.4/sql/sql_parse.cc:4641
      #14 0x000055a6e3ff25a7 in mysql_parse (thd=0x7fcaa0000b00, rawbuf=0x7fcaa0013108 "UPDATE t1 SET pk = 0", length=20, parser_state=0x7fcab18d3180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8157
      #15 0x000055a6e3fddc83 in dispatch_command (command=COM_QUERY, thd=0x7fcaa0000b00, packet=0x7fcaa0008311 "UPDATE t1 SET pk = 0", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1829
      #16 0x000055a6e3fdc441 in do_command (thd=0x7fcaa0000b00) at /data/src/10.4/sql/sql_parse.cc:1362
      #17 0x000055a6e4154411 in do_handle_one_connection (connect=0x55a6e6815ca0) at /data/src/10.4/sql/sql_connect.cc:1403
      #18 0x000055a6e4154175 in handle_one_connection (arg=0x55a6e6815ca0) at /data/src/10.4/sql/sql_connect.cc:1306
      #19 0x000055a6e4a7c6ab in pfs_spawn_thread (arg=0x55a6e68795a0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #20 0x00007fcab92764a4 in start_thread (arg=0x7fcab18d4700) at pthread_create.c:456
      #21 0x00007fcab77bed0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      No obvious problem on a non-debug build.

        Attachments

          Activity

            People

            • Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: