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

Server hangs upon UPDATE/DELETE on a view reading from versioned partitioned table

Details

    Description

      Note: The patch for MDEV-17091 is already in the branches.

      --source include/have_partition.inc
       
      CREATE TABLE t1 (f CHAR(6)) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 1 (PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT);
      INSERT INTO t1 VALUES (NULL);
      UPDATE t1 SET f = 'foo';
      UPDATE t1 SET f = 'bar';
      CREATE VIEW v1 AS SELECT * FROM t1 FOR SYSTEM_TIME ALL;
      UPDATE v1 SET f = '';
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      On a debug build, the test case causes an assertion failure. Reproducible with at least MyISAM, InnoDB, Aria:

      10.3 c7559747

      mysqld: /data/src/10.3/sql/ha_partition.cc:4404: virtual int ha_partition::update_row(const uchar*, const uchar*): Assertion `old_part_id == m_last_part' failed.
      200429 19:31:10 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f7abb953102 in __GI___assert_fail (assertion=0x55fd75b1a8e0 "old_part_id == m_last_part", file=0x55fd75b17220 "/data/src/10.3/sql/ha_partition.cc", line=4404, function=0x55fd75b22580 <ha_partition::update_row(unsigned char const*, unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::update_row(const uchar*, const uchar*)") at assert.c:101
      #8  0x000055fd74f9f159 in ha_partition::update_row (this=0x61d0001b5910, old_data=0x61900008a360 "\377      ^\251\253\316\r\221\346^\251\253\316\r\241\211\276\276\276\375bar   ^\251\253\316\r\246\252\177\377\377\377\017B?", '\276' <repeats 11 times>, "\300\243\b", new_data=0x61900008a348 "\375      ^\251\253\316\r\260y\177\377\377\377\017B?\276\276\276\377      ^\251\253\316\r\221\346^\251\253\316\r\241\211\276\276\276\375bar   ^\251\253\316\r\246\252\177\377\377\377\017B?", '\276' <repeats 11 times>, "\300\243\b") at /data/src/10.3/sql/ha_partition.cc:4404
      #9  0x000055fd73be7eeb in handler::ha_update_row (this=0x61d0001b5910, old_data=0x61900008a360 "\377      ^\251\253\316\r\221\346^\251\253\316\r\241\211\276\276\276\375bar   ^\251\253\316\r\246\252\177\377\377\377\017B?", '\276' <repeats 11 times>, "\300\243\b", new_data=0x61900008a348 "\375      ^\251\253\316\r\260y\177\377\377\377\017B?\276\276\276\377      ^\251\253\316\r\221\346^\251\253\316\r\241\211\276\276\276\375bar   ^\251\253\316\r\246\252\177\377\377\377\017B?", '\276' <repeats 11 times>, "\300\243\b") at /data/src/10.3/sql/handler.cc:6485
      #10 0x000055fd736dcb0f in mysql_update (thd=0x62a000060270, table_list=0x62b000000398, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7f7ab17b7e20, updated_return=0x7f7ab17b7e60) at /data/src/10.3/sql/sql_update.cc:952
      #11 0x000055fd734218b2 in mysql_execute_command (thd=0x62a000060270) at /data/src/10.3/sql/sql_parse.cc:4293
      #12 0x000055fd7343b25d in mysql_parse (thd=0x62a000060270, rawbuf=0x62b000000290 "UPDATE v1 SET f = ''", length=20, parser_state=0x7f7ab17b99a0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7817
      #13 0x000055fd73411af0 in dispatch_command (command=COM_QUERY, thd=0x62a000060270, packet=0x6290000e6271 "UPDATE v1 SET f = ''", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1855
      #14 0x000055fd7340e22b in do_command (thd=0x62a000060270) at /data/src/10.3/sql/sql_parse.cc:1401
      #15 0x000055fd737f7ab9 in do_handle_one_connection (connect=0x611000005fb0) at /data/src/10.3/sql/sql_connect.cc:1403
      #16 0x000055fd737f7371 in handle_one_connection (arg=0x611000005fb0) at /data/src/10.3/sql/sql_connect.cc:1308
      #17 0x000055fd74f451ab in pfs_spawn_thread (arg=0x61600000cff0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #18 0x00007f7abc1cdfa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
      #19 0x00007f7abba1c4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      On a non-debug build it passes with MyISAM and Aria, but hangs with InnoDB, seemingly forever, or until InnoDB buffer pool is 95% exhausted (the latter was observed with small buffer pools, like the one that MTR sets; when set to a bigger value, it continues running, I have no information whether it keeps growing and will ever abort):

      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      CREATE TABLE t1 (f CHAR(6)) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 1 (PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT);
      INSERT INTO t1 VALUES (NULL);
      UPDATE t1 SET f = 'foo';
      UPDATE t1 SET f = 'bar';
      CREATE VIEW v1 AS SELECT * FROM t1 FOR SYSTEM_TIME ALL;
      UPDATE v1 SET f = '';
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      The thread doing update is below, all threads stack trace from the hanging server is attached.

      10.3 RelWithDebInfo c7559747

      Thread 27 (Thread 0x7f198c100700 (LWP 1262)):
      #0  page_align (ptr=<optimized out>) at /data/src/10.3/storage/innobase/include/page0page.h:212
      #1  page_rec_is_comp (rec=<optimized out>) at /data/src/10.3/storage/innobase/include/page0page.h:283
      #2  page_rec_get_next (rec=<optimized out>) at /data/src/10.3/storage/innobase/include/page0page.ic:699
      #3  btr_search_update_hash_node_on_insert (cursor=cursor@entry=0x7f198c0fc1a0, ahi_latch=0x561ec8bf0e00) at /data/src/10.3/storage/innobase/btr/btr0sea.cc:1761
      #4  0x0000561ec5de4bef in btr_cur_optimistic_insert (flags=flags@entry=0, cursor=cursor@entry=0x7f198c0fc1a0, offsets=offsets@entry=0x7f198c0fc148, heap=heap@entry=0x7f198c0fc140, entry=entry@entry=0x7f19340814e8, rec=rec@entry=0x7f198c0fc600, big_rec=0x7f198c0fc138, n_ext=<optimized out>, thr=0x7f19340a9dc8, mtr=0x7f198c0fcb60) at /data/src/10.3/storage/innobase/btr/btr0cur.cc:3489
      #5  0x0000561ec5d3b389 in row_ins_clust_index_entry_low (flags=flags@entry=0, mode=mode@entry=2, index=index@entry=0x7f1934069ef8, n_uniq=n_uniq@entry=0, entry=entry@entry=0x7f19340814e8, n_ext=n_ext@entry=0, thr=0x7f19340a9dc8) at /data/src/10.3/storage/innobase/row/row0ins.cc:2747
      #6  0x0000561ec5d3cd05 in row_ins_clust_index_entry (index=index@entry=0x7f1934069ef8, entry=entry@entry=0x7f19340814e8, thr=thr@entry=0x7f19340a9dc8, n_ext=n_ext@entry=0) at /data/src/10.3/storage/innobase/row/row0ins.cc:3203
      #7  0x0000561ec5d3ed88 in row_ins_index_entry (thr=0x7f19340a9dc8, entry=<optimized out>, index=<optimized out>) at /data/src/10.3/storage/innobase/row/row0ins.cc:3328
      #8  row_ins_index_entry_step (thr=0x7f19340a9dc8, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0ins.cc:3479
      #9  row_ins (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0ins.cc:3616
      #10 row_ins_step (thr=thr@entry=0x7f19340a9dc8) at /data/src/10.3/storage/innobase/row/row0ins.cc:3755
      #11 0x0000561ec5d4dfd1 in row_insert_for_mysql (mysql_rec=mysql_rec@entry=0x7f1934065758 "\375      ^\251\254\364\016\004\266\177\377\377\377\017B?", prebuilt=0x7f19340a9628, ins_mode=<optimized out>) at /data/src/10.3/storage/innobase/row/row0mysql.cc:1462
      #12 0x0000561ec5ca3614 in ha_innobase::write_row (this=0x7f1934071e40, record=0x7f1934065758 "\375      ^\251\254\364\016\004\266\177\377\377\377\017B?") at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:8035
      #13 0x0000561ec5b3a05f in handler::ha_write_row (this=0x7f1934071e40, buf=buf@entry=0x7f1934065758 "\375      ^\251\254\364\016\004\266\177\377\377\377\017B?") at /data/src/10.3/sql/handler.cc:6453
      #14 0x0000561ec5fc1aec in ha_partition::update_row (this=0x7f19340707d0, old_data=0x7f1934065770 "\377      ^\251\254\364\016\002#^\251\254\364\016\004\266", new_data=0x7f1934065758 "\375      ^\251\254\364\016\004\266\177\377\377\377\017B?") at /data/src/10.3/sql/ha_partition.cc:4445
      #15 0x0000561ec5b3a15b in handler::ha_update_row (this=0x7f19340707d0, old_data=0x7f1934065770 "\377      ^\251\254\364\016\002#^\251\254\364\016\004\266", new_data=0x7f1934065758 "\375      ^\251\254\364\016\004\266\177\377\377\377\017B?") at /data/src/10.3/sql/handler.cc:6485
      #16 0x0000561ec5a0054c in mysql_update (thd=thd@entry=0x7f19340009a8, table_list=<optimized out>, fields=..., values=..., conds=<optimized out>, order_num=<optimized out>, order=<optimized out>, limit=18446744073705284565, ignore=false, found_return=0x7f198c0fdf60, updated_return=0x7f198c0fe020) at /data/src/10.3/sql/sql_update.cc:952
      #17 0x0000561ec5967b57 in mysql_execute_command (thd=thd@entry=0x7f19340009a8) at /data/src/10.3/sql/sql_parse.cc:4300
      #18 0x0000561ec596e8e9 in mysql_parse (thd=thd@entry=0x7f19340009a8, rawbuf=<optimized out>, length=20, parser_state=parser_state@entry=0x7f198c0ff620, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:7817
      #19 0x0000561ec59703d3 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f19340009a8, packet=packet@entry=0x7f19340070c9 "UPDATE v1 SET f = ''", packet_length=packet_length@entry=20, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #20 0x0000561ec5971d9a in do_command (thd=0x7f19340009a8) at /data/src/10.3/sql/sql_parse.cc:1401
      #21 0x0000561ec5a39254 in do_handle_one_connection (connect=connect@entry=0x561ec8d44388) at /data/src/10.3/sql/sql_connect.cc:1403
      #22 0x0000561ec5a393b4 in handle_one_connection (arg=arg@entry=0x561ec8d44388) at /data/src/10.3/sql/sql_connect.cc:1308
      #23 0x0000561ec5fa3c04 in pfs_spawn_thread (arg=0x561ec8ce0c58) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #24 0x00007f1994cbc4a4 in start_thread (arg=0x7f198c100700) at pthread_create.c:456
      #25 0x00007f1992df0d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Attachments

        Issue Links

          Activity

            Based on the stack trace, it looks like the UPDATE is actually moving data between partitions (essentially DELETE and INSERT from the InnoDB point of view). MDEV-16232 would help there by allowing the DELETE operations to use implicit locking.

            marko Marko Mäkelä added a comment - Based on the stack trace, it looks like the UPDATE is actually moving data between partitions (essentially DELETE and INSERT from the InnoDB point of view). MDEV-16232 would help there by allowing the DELETE operations to use implicit locking.

            Usual variation caused by DELETE, otherwise same test case:

            --source include/have_partition.inc
             
            CREATE TABLE t1 (f CHAR(6)) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 1 (PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT);
            INSERT INTO t1 VALUES (NULL);
            UPDATE t1 SET f = 'foo';
            UPDATE t1 SET f = 'bar';
            CREATE VIEW v1 AS SELECT * FROM t1 FOR SYSTEM_TIME ALL;
            DELETE FROM v1;
             
            # Cleanup
            DROP VIEW v1;
            DROP TABLE t1;
            

            10.5 89aebdf9

            2020-05-01  3:26:38 4 [Warning] mariadbd: Versioned table `test`.`t1`: last HISTORY partition (`p2`) is out of LIMIT, need more HISTORY partitions
            mariadbd: /data/src/10.5/sql/ha_partition.cc:4627: virtual int ha_partition::delete_row(const uchar*): Assertion `part_id == m_last_part' failed.
            200501  3:26:38 [ERROR] mysqld got signal 6 ;
             
            #7  0x00007f1abbf34f12 in __GI___assert_fail (assertion=0x555b90514a02 "part_id == m_last_part", file=0x555b90513878 "/data/src/10.5/sql/ha_partition.cc", line=4627, function=0x555b90517ec0 <ha_partition::delete_row(unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::delete_row(const uchar*)") at assert.c:101
            #8  0x0000555b8fb9b705 in ha_partition::delete_row (this=0x7f1aa4009dc0, buf=0x7f1aa4212da8 "\377      ^\253l\276\016\063\304^\253l\276\016\265J\245\245\245\375foo   ^\253l\276\016\265J\177\377\377\377\017B?\245\245\245\375bar   ^\253l\276\016\266\277\177\377\377\377\017B?\245\245\245\020.!\244\032\177") at /data/src/10.5/sql/ha_partition.cc:4627
            #9  0x0000555b8f84b901 in handler::ha_delete_row (this=0x7f1aa4009dc0, buf=0x7f1aa4212da8 "\377      ^\253l\276\016\063\304^\253l\276\016\265J\245\245\245\375foo   ^\253l\276\016\265J\177\377\377\377\017B?\245\245\245\375bar   ^\253l\276\016\266\277\177\377\377\377\017B?\245\245\245\020.!\244\032\177") at /data/src/10.5/sql/handler.cc:7082
            #10 0x0000555b8fa157d1 in TABLE::delete_row (this=0x7f1aa4008f48) at /data/src/10.5/sql/sql_delete.cc:277
            #11 0x0000555b8fa1269c in mysql_delete (thd=0x7f1aa4000b18, table_list=0x7f1aa4013a18, conds=0x0, order_list=0x7f1aa40055c8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.5/sql/sql_delete.cc:795
            #12 0x0000555b8f4e6877 in mysql_execute_command (thd=0x7f1aa4000b18) at /data/src/10.5/sql/sql_parse.cc:4749
            #13 0x0000555b8f4f12c6 in mysql_parse (thd=0x7f1aa4000b18, rawbuf=0x7f1aa4013950 "DELETE FROM v1", length=14, parser_state=0x7f1ab6ad2520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7957
            #14 0x0000555b8f4dd5ce in dispatch_command (command=COM_QUERY, thd=0x7f1aa4000b18, packet=0x7f1aa41b0609 "DELETE FROM v1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1840
            #15 0x0000555b8f4dbd60 in do_command (thd=0x7f1aa4000b18) at /data/src/10.5/sql/sql_parse.cc:1359
            #16 0x0000555b8f67f396 in do_handle_one_connection (connect=0x555b92d94fd8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1422
            #17 0x0000555b8f67f0c5 in handle_one_connection (arg=0x555b92d94fd8) at /data/src/10.5/sql/sql_connect.cc:1319
            #18 0x0000555b8fbb4966 in pfs_spawn_thread (arg=0x555b92d6fa18) at /data/src/10.5/storage/perfschema/pfs.cc:2201
            #19 0x00007f1abdebd4a4 in start_thread (arg=0x7f1ab6ad3700) at pthread_create.c:456
            #20 0x00007f1abbff1d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
            

            elenst Elena Stepanova added a comment - Usual variation caused by DELETE, otherwise same test case: --source include/have_partition.inc   CREATE TABLE t1 (f CHAR (6)) WITH SYSTEM VERSIONING PARTITION BY system_time LIMIT 1 (PARTITION p1 HISTORY, PARTITION p2 HISTORY, PARTITION pn CURRENT ); INSERT INTO t1 VALUES ( NULL ); UPDATE t1 SET f = 'foo' ; UPDATE t1 SET f = 'bar' ; CREATE VIEW v1 AS SELECT * FROM t1 FOR SYSTEM_TIME ALL ; DELETE FROM v1;   # Cleanup DROP VIEW v1; DROP TABLE t1; 10.5 89aebdf9 2020-05-01 3:26:38 4 [Warning] mariadbd: Versioned table `test`.`t1`: last HISTORY partition (`p2`) is out of LIMIT, need more HISTORY partitions mariadbd: /data/src/10.5/sql/ha_partition.cc:4627: virtual int ha_partition::delete_row(const uchar*): Assertion `part_id == m_last_part' failed. 200501 3:26:38 [ERROR] mysqld got signal 6 ;   #7 0x00007f1abbf34f12 in __GI___assert_fail (assertion=0x555b90514a02 "part_id == m_last_part", file=0x555b90513878 "/data/src/10.5/sql/ha_partition.cc", line=4627, function=0x555b90517ec0 <ha_partition::delete_row(unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::delete_row(const uchar*)") at assert.c:101 #8 0x0000555b8fb9b705 in ha_partition::delete_row (this=0x7f1aa4009dc0, buf=0x7f1aa4212da8 "\377 ^\253l\276\016\063\304^\253l\276\016\265J\245\245\245\375foo ^\253l\276\016\265J\177\377\377\377\017B?\245\245\245\375bar ^\253l\276\016\266\277\177\377\377\377\017B?\245\245\245\020.!\244\032\177") at /data/src/10.5/sql/ha_partition.cc:4627 #9 0x0000555b8f84b901 in handler::ha_delete_row (this=0x7f1aa4009dc0, buf=0x7f1aa4212da8 "\377 ^\253l\276\016\063\304^\253l\276\016\265J\245\245\245\375foo ^\253l\276\016\265J\177\377\377\377\017B?\245\245\245\375bar ^\253l\276\016\266\277\177\377\377\377\017B?\245\245\245\020.!\244\032\177") at /data/src/10.5/sql/handler.cc:7082 #10 0x0000555b8fa157d1 in TABLE::delete_row (this=0x7f1aa4008f48) at /data/src/10.5/sql/sql_delete.cc:277 #11 0x0000555b8fa1269c in mysql_delete (thd=0x7f1aa4000b18, table_list=0x7f1aa4013a18, conds=0x0, order_list=0x7f1aa40055c8, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.5/sql/sql_delete.cc:795 #12 0x0000555b8f4e6877 in mysql_execute_command (thd=0x7f1aa4000b18) at /data/src/10.5/sql/sql_parse.cc:4749 #13 0x0000555b8f4f12c6 in mysql_parse (thd=0x7f1aa4000b18, rawbuf=0x7f1aa4013950 "DELETE FROM v1", length=14, parser_state=0x7f1ab6ad2520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7957 #14 0x0000555b8f4dd5ce in dispatch_command (command=COM_QUERY, thd=0x7f1aa4000b18, packet=0x7f1aa41b0609 "DELETE FROM v1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1840 #15 0x0000555b8f4dbd60 in do_command (thd=0x7f1aa4000b18) at /data/src/10.5/sql/sql_parse.cc:1359 #16 0x0000555b8f67f396 in do_handle_one_connection (connect=0x555b92d94fd8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1422 #17 0x0000555b8f67f0c5 in handle_one_connection (arg=0x555b92d94fd8) at /data/src/10.5/sql/sql_connect.cc:1319 #18 0x0000555b8fbb4966 in pfs_spawn_thread (arg=0x555b92d6fa18) at /data/src/10.5/storage/perfschema/pfs.cc:2201 #19 0x00007f1abdebd4a4 in start_thread (arg=0x7f1ab6ad3700) at pthread_create.c:456 #20 0x00007f1abbff1d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
            midenok Aleksey Midenkov added a comment - https://github.com/MariaDB/server/commit/d8ca2bb0d84a0c09566a4feb0807d68e79e8944f

            Additional testcase

            USE test;
            SET SQL_MODE='';
            CREATE TABLE t (c1 INT UNSIGNED,c2 CHAR) PARTITION BY KEY (c1) PARTITIONS 2;
            INSERT INTO t VALUES (NULL,0),(NULL,1);
            ALTER TABLE t ADD PRIMARY KEY (c1,c2);
            DELETE FROM t;
            

            Leads to:

            10.5.4 3b251e24b6c8fe81bc5eeca086d9c1e57e6739d2

            mysqld: /test/10.5_dbg/sql/ha_partition.cc:4627: virtual int ha_partition::delete_row(const uchar*): Assertion `part_id == m_last_part' failed.
            

            10.5.4 3b251e24b6c8fe81bc5eeca086d9c1e57e6739d2

            Core was generated by `/test/MD150520-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
            Program terminated with signal SIGABRT, Aborted.
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
                at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            [Current thread is 1 (Thread 0x14e4a693f700 (LWP 714044))]
            (gdb) bt
            #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
            #1  0x0000555956ea7279 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
            #2  0x000055595664bfcb in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
            #3  <signal handler called>
            #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
            #5  0x000014e4a5083801 in __GI_abort () at abort.c:79
            #6  0x000014e4a507339a in __assert_fail_base (fmt=0x14e4a51fa7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x555957240fce "part_id == m_last_part", file=file@entry=0x55595723d708 "/test/10.5_dbg/sql/ha_partition.cc", line=line@entry=4627, function=function@entry=0x555957242260 <ha_partition::delete_row(unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::delete_row(const uchar*)") at assert.c:92
            #7  0x000014e4a5073412 in __GI___assert_fail (assertion=assertion@entry=0x555957240fce "part_id == m_last_part", file=file@entry=0x55595723d708 "/test/10.5_dbg/sql/ha_partition.cc", line=line@entry=4627, function=function@entry=0x555957242260 <ha_partition::delete_row(unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::delete_row(const uchar*)") at assert.c:101
            #8  0x000055595693b875 in ha_partition::delete_row (this=0x14e48295aaa0, buf=0x14e4828589c0 "\377") at /test/10.5_dbg/sql/ha_partition.cc:4627
            #9  0x00005559566608d1 in handler::ha_delete_row (this=0x14e48295aaa0, buf=0x14e4828589c0 "\377") at /test/10.5_dbg/sql/handler.cc:7100
            #10 0x000055595681074f in TABLE::delete_row (this=0x14e4828fa088) at /test/10.5_dbg/sql/sql_delete.cc:277
            #11 0x000055595680f7f8 in mysql_delete (thd=thd@entry=0x14e482815088, table_list=0x14e482874168, conds=<optimized out>, order_list=order_list@entry=0x14e482819b38, limit=18446744073709551615, options=<optimized out>, result=<optimized out>) at /test/10.5_dbg/sql/sql_delete.cc:794
            #12 0x00005559563a4dac in mysql_execute_command (thd=thd@entry=0x14e482815088) at /test/10.5_dbg/sql/sql_parse.cc:4749
            #13 0x00005559563af86a in mysql_parse (thd=thd@entry=0x14e482815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e4a693e3e0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
            #14 0x000055595639c063 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e482815088, packet=packet@entry=0x14e482867089 "DELETE FROM t", packet_length=packet_length@entry=13, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
            #15 0x000055595639a932 in do_command (thd=0x14e482815088) at /test/10.5_dbg/sql/sql_parse.cc:1358
            #16 0x00005559564f4a35 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14e4858453a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
            #17 0x00005559564f5151 in handle_one_connection (arg=arg@entry=0x14e4858453a8) at /test/10.5_dbg/sql/sql_connect.cc:1313
            #18 0x00005559569531ce in pfs_spawn_thread (arg=0x14e4a4445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #19 0x000014e4a5d666db in start_thread (arg=0x14e4a693f700) at pthread_create.c:463
            #20 0x000014e4a516488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
            

            Bug confirmed present in:
            MariaDB: 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg), 10.5.4 (dbg)

            Bug confirmed not present in:
            MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt), 10.5.4 (opt), 10.6.0 (dbg), 10.6.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            Roel Roel Van de Paar added a comment - Additional testcase USE test; SET SQL_MODE=''; CREATE TABLE t (c1 INT UNSIGNED,c2 CHAR) PARTITION BY KEY (c1) PARTITIONS 2; INSERT INTO t VALUES (NULL,0),(NULL,1); ALTER TABLE t ADD PRIMARY KEY (c1,c2); DELETE FROM t; Leads to: 10.5.4 3b251e24b6c8fe81bc5eeca086d9c1e57e6739d2 mysqld: /test/10.5_dbg/sql/ha_partition.cc:4627: virtual int ha_partition::delete_row(const uchar*): Assertion `part_id == m_last_part' failed. 10.5.4 3b251e24b6c8fe81bc5eeca086d9c1e57e6739d2 Core was generated by `/test/MD150520-mariadb-10.5.4-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'. Program terminated with signal SIGABRT, Aborted. #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 [Current thread is 1 (Thread 0x14e4a693f700 (LWP 714044))] (gdb) bt #0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57 #1 0x0000555956ea7279 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518 #2 0x000055595664bfcb in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x000014e4a5083801 in __GI_abort () at abort.c:79 #6 0x000014e4a507339a in __assert_fail_base (fmt=0x14e4a51fa7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x555957240fce "part_id == m_last_part", file=file@entry=0x55595723d708 "/test/10.5_dbg/sql/ha_partition.cc", line=line@entry=4627, function=function@entry=0x555957242260 <ha_partition::delete_row(unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::delete_row(const uchar*)") at assert.c:92 #7 0x000014e4a5073412 in __GI___assert_fail (assertion=assertion@entry=0x555957240fce "part_id == m_last_part", file=file@entry=0x55595723d708 "/test/10.5_dbg/sql/ha_partition.cc", line=line@entry=4627, function=function@entry=0x555957242260 <ha_partition::delete_row(unsigned char const*)::__PRETTY_FUNCTION__> "virtual int ha_partition::delete_row(const uchar*)") at assert.c:101 #8 0x000055595693b875 in ha_partition::delete_row (this=0x14e48295aaa0, buf=0x14e4828589c0 "\377") at /test/10.5_dbg/sql/ha_partition.cc:4627 #9 0x00005559566608d1 in handler::ha_delete_row (this=0x14e48295aaa0, buf=0x14e4828589c0 "\377") at /test/10.5_dbg/sql/handler.cc:7100 #10 0x000055595681074f in TABLE::delete_row (this=0x14e4828fa088) at /test/10.5_dbg/sql/sql_delete.cc:277 #11 0x000055595680f7f8 in mysql_delete (thd=thd@entry=0x14e482815088, table_list=0x14e482874168, conds=<optimized out>, order_list=order_list@entry=0x14e482819b38, limit=18446744073709551615, options=<optimized out>, result=<optimized out>) at /test/10.5_dbg/sql/sql_delete.cc:794 #12 0x00005559563a4dac in mysql_execute_command (thd=thd@entry=0x14e482815088) at /test/10.5_dbg/sql/sql_parse.cc:4749 #13 0x00005559563af86a in mysql_parse (thd=thd@entry=0x14e482815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14e4a693e3e0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957 #14 0x000055595639c063 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e482815088, packet=packet@entry=0x14e482867089 "DELETE FROM t", packet_length=packet_length@entry=13, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839 #15 0x000055595639a932 in do_command (thd=0x14e482815088) at /test/10.5_dbg/sql/sql_parse.cc:1358 #16 0x00005559564f4a35 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x14e4858453a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411 #17 0x00005559564f5151 in handle_one_connection (arg=arg@entry=0x14e4858453a8) at /test/10.5_dbg/sql/sql_connect.cc:1313 #18 0x00005559569531ce in pfs_spawn_thread (arg=0x14e4a4445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201 #19 0x000014e4a5d666db in start_thread (arg=0x14e4a693f700) at pthread_create.c:463 #20 0x000014e4a516488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 Bug confirmed present in: MariaDB: 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg), 10.5.4 (dbg) Bug confirmed not present in: MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt), 10.5.4 (opt), 10.6.0 (dbg), 10.6.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.