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

Server crashes in check_fields upon 2nd execution of SP with UPDATE on app-versioned table

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (a INT);
       
      CREATE TABLE t2 (c1 INT, s DATE, e DATE, PERIOD FOR app(s,e));
      CREATE PROCEDURE sp() UPDATE t2 FOR PORTION OF app FROM '2019-05-01' TO '2019-10-31' SET c1 = 1 WHERE c1 != 1; 
      LOCK TABLE t1 READ ;
      --error ER_TABLE_NOT_LOCKED
      CALL sp;
      UNLOCK TABLES;
      CALL sp;
       
      # Cleanup
      DROP PROCEDURE sp;
      DROP TABLE t1, t2;
      

      10.4 13f36fff

      #3  <signal handler called>
      #4  0x0000560071375ab4 in check_fields (thd=0x7f4b20000b00, table=0x7f4b20194920, items=..., update_view=false) at /data/src/10.4/sql/sql_update.cc:194
      #5  0x000056007137696f in mysql_update (thd=0x7f4b20000b00, table_list=0x7f4b20194920, fields=..., values=..., conds=0x7f4b201980c8, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7f4b840d1930, updated_return=0x7f4b840d19f0) at /data/src/10.4/sql/sql_update.cc:473
      #6  0x0000560071272f28 in mysql_execute_command (thd=0x7f4b20000b00) at /data/src/10.4/sql/sql_parse.cc:4376
      #7  0x000056007118c93d in sp_instr_stmt::exec_core (this=0x7f4b20198210, thd=0x7f4b20000b00, nextp=0x7f4b840d2704) at /data/src/10.4/sql/sp_head.cc:3607
      #8  0x000056007118bc9a in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f4b20198258, thd=0x7f4b20000b00, nextp=0x7f4b840d2704, open_tables=false, instr=0x7f4b20198210) at /data/src/10.4/sql/sp_head.cc:3335
      #9  0x000056007118c4e2 in sp_instr_stmt::execute (this=0x7f4b20198210, thd=0x7f4b20000b00, nextp=0x7f4b840d2704) at /data/src/10.4/sql/sp_head.cc:3513
      #10 0x0000560071186102 in sp_head::execute (this=0x7f4b20193518, thd=0x7f4b20000b00, merge_da_on_success=true) at /data/src/10.4/sql/sp_head.cc:1346
      #11 0x0000560071188a79 in sp_head::execute_procedure (this=0x7f4b20193518, thd=0x7f4b20000b00, args=0x7f4b200058e8) at /data/src/10.4/sql/sp_head.cc:2288
      #12 0x000056007126ec2d in do_execute_sp (thd=0x7f4b20000b00, sp=0x7f4b20193518) at /data/src/10.4/sql/sql_parse.cc:3019
      #13 0x000056007126f820 in Sql_cmd_call::execute (this=0x7f4b20012fe0, thd=0x7f4b20000b00) at /data/src/10.4/sql/sql_parse.cc:3261
      #14 0x000056007127a30f in mysql_execute_command (thd=0x7f4b20000b00) at /data/src/10.4/sql/sql_parse.cc:6098
      #15 0x000056007127f57f in mysql_parse (thd=0x7f4b20000b00, rawbuf=0x7f4b20012f18 "CALL sp_grammar2", length=16, parser_state=0x7f4b840d41c0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7908
      #16 0x000056007126b828 in dispatch_command (command=COM_QUERY, thd=0x7f4b20000b00, packet=0x7f4b201426f1 "CALL sp_grammar2 ", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1843
      #17 0x0000560071269f6e in do_command (thd=0x7f4b20000b00) at /data/src/10.4/sql/sql_parse.cc:1360
      #18 0x00005600713e3b02 in do_handle_one_connection (connect=0x560074765b80) at /data/src/10.4/sql/sql_connect.cc:1404
      #19 0x00005600713e3851 in handle_one_connection (arg=0x560074765b80) at /data/src/10.4/sql/sql_connect.cc:1306
      #20 0x00007f4b893fa4a4 in start_thread (arg=0x7f4b840d5700) at pthread_create.c:456
      #21 0x00007f4b87942d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Non-debug build crashes the same way.

      Attachments

        Issue Links

          Activity

            People

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