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

Server crashes in _ma_unpin_all_pages upon updating application period with overlaps

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (id INT, f INT, s DATE, e DATE, PERIOD FOR p(s,e), PRIMARY KEY(id, p WITHOUT OVERLAPS)) ENGINE=Aria;
      INSERT INTO t VALUES (1,10,'1999-01-01','2001-02-02'),(2,20,'1999-01-01','2001-02-02');
      UPDATE t FOR PORTION OF p FROM '1999-01-01' TO '2001-02-02' SET f = 30;
       
      # Cleanup
      DROP TABLE t;
      

      11.1 4e5b771e

      #3  <signal handler called>
      #4  0x000055f5068cd45a in _ma_unpin_all_pages (info=0x629000276218, undo_lsn=0) at /data/src/11.1/storage/maria/ma_key_recover.c:71
      #5  0x000055f5068b550c in _ma_search (info=0x629000276218, key=0x7f23280d1fe0, nextflag=262186, pos=8192) at /data/src/11.1/storage/maria/ma_search.c:99
      #6  0x000055f5068b1047 in maria_rkey (info=0x629000276218, buf=0x61900009c32b '\276' <repeats 101 times>, inx=0, key_data=0x61900009c320 "\001", keypart_map=3, search_flag=HA_READ_AFTER_KEY) at /data/src/11.1/storage/maria/ma_rkey.c:104
      #7  0x000055f5067e3650 in ha_maria::index_read_map (this=0x6290000e8598, buf=0x61900009c32b '\276' <repeats 101 times>, key=0x61900009c320 "\001", keypart_map=3, find_flag=HA_READ_AFTER_KEY) at /data/src/11.1/storage/maria/ha_maria.cc:2523
      #8  0x000055f5062e35b5 in handler::ha_index_read_map (this=0x6290000e8598, buf=0x61900009c32b '\276' <repeats 101 times>, key=0x61900009c320 "\001", keypart_map=3, find_flag=HA_READ_AFTER_KEY) at /data/src/11.1/sql/handler.cc:3648
      #9  0x000055f5063063e8 in handler::ha_check_overlaps (this=0x61d000233cb8, old_data=0x61900009bad8 "\375\001", new_data=0x61900009bac8 "\375\001") at /data/src/11.1/sql/handler.cc:7631
      #10 0x000055f506308c68 in handler::ha_update_row (this=0x61d000233cb8, old_data=0x61900009bad8 "\375\001", new_data=0x61900009bac8 "\375\001") at /data/src/11.1/sql/handler.cc:7828
      #11 0x000055f505d4a2b6 in Sql_cmd_update::update_single_table (this=0x6290000e6e60, thd=0x62b00007e218) at /data/src/11.1/sql/sql_update.cc:987
      #12 0x000055f505d5ecc9 in Sql_cmd_update::execute_inner (this=0x6290000e6e60, thd=0x62b00007e218) at /data/src/11.1/sql/sql_update.cc:3058
      #13 0x000055f505baf44e in Sql_cmd_dml::execute (this=0x6290000e6e60, thd=0x62b00007e218) at /data/src/11.1/sql/sql_select.cc:32552
      #14 0x000055f5059d7ead in mysql_execute_command (thd=0x62b00007e218, is_called_from_prepared_stmt=false) at /data/src/11.1/sql/sql_parse.cc:4393
      #15 0x000055f5059ef33a in mysql_parse (thd=0x62b00007e218, rawbuf=0x6290000e6238 "UPDATE t FOR PORTION OF p FROM '1999-01-01' TO '2001-02-02' SET f = 30", length=70, parser_state=0x7f23280d3a20) at /data/src/11.1/sql/sql_parse.cc:7760
      #16 0x000055f5059c7ab1 in dispatch_command (command=COM_QUERY, thd=0x62b00007e218, packet=0x629000258219 "UPDATE t FOR PORTION OF p FROM '1999-01-01' TO '2001-02-02' SET f = 30", packet_length=70, blocking=true) at /data/src/11.1/sql/sql_parse.cc:1892
      #17 0x000055f5059c47ef in do_command (thd=0x62b00007e218, blocking=true) at /data/src/11.1/sql/sql_parse.cc:1405
      #18 0x000055f505e7c6e2 in do_handle_one_connection (connect=0x608000002eb8, put_in_cache=true) at /data/src/11.1/sql/sql_connect.cc:1416
      #19 0x000055f505e7c0a3 in handle_one_connection (arg=0x608000002e38) at /data/src/11.1/sql/sql_connect.cc:1318
      #20 0x000055f506a75a3c in pfs_spawn_thread (arg=0x617000005b98) at /data/src/11.1/storage/perfschema/pfs.cc:2201
      #21 0x00007f232f8a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #22 0x00007f232f9285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The failure started happening after the set of commits related to MDEV-7487 / MDEV-28883, the exact commit is unknown since there were intermediate build and test failures. In the current form (as described above) it first failed on

      commit 554278e24dbc2c0af9fcfd66c54ca6a99a3cf17f
      Author: Igor Babaev
      Date:   Mon Jan 9 22:39:39 2023 -0800
       
          MDEV-7487 Semi-join optimization for single-table update/delete statements
      

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.