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

Server crashes in handler::print_error / ha_partition::print_error upon query timeout

    Details

      Description

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t1 (i INT) ENGINE=InnoDB PARTITION BY HASH (i) PARTITIONS 2;
      XA START 'xid';
      INSERT INTO t1 VALUES (1),(2),(3),(4);
       
      --connect (con1,localhost,root,,test)
      --send
        CREATE TABLE t2 SELECT * FROM t1;
       
      --connect (con2,localhost,root,,test)
      SET max_statement_time= 1;
      --error ER_STATEMENT_TIMEOUT
      DELETE FROM t1 PARTITION (p1) ORDER BY i LIMIT 2;
       
       
      # Cleanup
      --disconnect con2
      --connection default
      XA END 'xid';
      XA ROLLBACK 'xid';
      --connection con1
      --reap
      --disconnect con1
      --connection default
      call mtr.add_suppression('Sort aborted');
      DROP TABLE IF EXISTS t2, t1;
      

      10.3 990289a78f

      #3  <signal handler called>
      #4  0x0000557586fbc4a8 in handler::print_error (this=0x7fb85801c468, error=188, errflag=68) at /data/src/10.3/sql/handler.cc:3588
      #5  0x0000557587752ca5 in ha_partition::print_error (this=0x7fb85801b758, error=188, errflag=68) at /data/src/10.3/sql/ha_partition.cc:9725
      #6  0x0000557586fae42c in find_all_keys (thd=0x7fb858000b00, param=0x7fb8ac4fd820, select=0x0, fs_info=0x7fb85801ff60, buffpek_pointers=0x7fb8ac4fda20, tempfile=0x7fb8ac4fd8b0, pq=0x0, found_rows=0x7fb858020140) at /data/src/10.3/sql/filesort.cc:894
      #7  0x0000557586fac4f8 in filesort (thd=0x7fb858000b00, table=0x7fb85801ab10, filesort=0x7fb8ac4fdcd0, tracker=0x7fb858014758, join=0x0, first_table_bit=0) at /data/src/10.3/sql/filesort.cc:278
      #8  0x00005575871691fc in mysql_delete (thd=0x7fb858000b00, table_list=0x7fb858013a28, conds=0x0, order_list=0x7fb858005278, limit=2, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:639
      #9  0x0000557586cced1d in mysql_execute_command (thd=0x7fb858000b00) at /data/src/10.3/sql/sql_parse.cc:4902
      #10 0x0000557586cd8812 in mysql_parse (thd=0x7fb858000b00, rawbuf=0x7fb8580138c8 "DELETE FROM t1 PARTITION (p1) ORDER BY i LIMIT 2", length=48, parser_state=0x7fb8ac4ff5e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7980
      #11 0x0000557586cc5fc5 in dispatch_command (command=COM_QUERY, thd=0x7fb858000b00, packet=0x7fb85800b191 "DELETE FROM t1 PARTITION (p1) ORDER BY i LIMIT 2", packet_length=48, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1825
      #12 0x0000557586cc4a04 in do_command (thd=0x7fb858000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #13 0x0000557586e2d5e5 in do_handle_one_connection (connect=0x55758944f610) at /data/src/10.3/sql/sql_connect.cc:1402
      #14 0x0000557586e2d372 in handle_one_connection (arg=0x55758944f610) at /data/src/10.3/sql/sql_connect.cc:1308
      #15 0x00005575872ccd6f in pfs_spawn_thread (arg=0x557589471630) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #16 0x00007fb8bb6a3494 in start_thread (arg=0x7fb8ac500700) at pthread_create.c:333
      #17 0x00007fb8b9a8993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f0698011520): DELETE FROM t1 PARTITION (p1) ORDER BY i LIMIT 2
      Connection ID (thread ID): 11
      Status: KILL_TIMEOUT
      

      Not reproducible on 10.2.
      Non-debug build crashes the same way.

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: