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

Server crashes in st_select_lex::add_table_to_list upon mix of KILL and sequences

Details

    Description

      --error ER_SUBQUERIES_NOT_SUPPORTED
      KILL ( SELECT 1 ) + LASTVAL(s);
      

      10.4 81f70001

      #3  <signal handler called>
      #4  0x0000562f80f6090b in st_select_lex::add_table_to_list (this=0x0, thd=0x7f0374000af0, table=0x7f0374014278, alias=0x0, table_options=16, lock_type=TL_READ, mdl_type=MDL_SHARED_READ, index_hints_arg=0x0, partition_names=0x0, option=0x0) at /data/src/10.4/sql/sql_parse.cc:8164
      #5  0x0000562f80f28d79 in LEX::create_item_func_lastval (this=0x7f0374004958, thd=0x7f0374000af0, table_ident=0x7f0374014278) at /data/src/10.4/sql/sql_lex.cc:7323
      #6  0x0000562f81202d7a in MYSQLparse (thd=0x7f0374000af0) at /data/src/10.4/sql/sql_yacc.yy:10526
      #7  0x0000562f80f6503a in parse_sql (thd=0x7f0374000af0, parser_state=0x7f0384d33160, creation_ctx=0x0, do_pfs_digest=true) at /data/src/10.4/sql/sql_parse.cc:10206
      #8  0x0000562f80f5f85e in mysql_parse (thd=0x7f0374000af0, rawbuf=0x7f03740132f0 "KILL ( SELECT 1 ) + LASTVAL(s)", length=30, parser_state=0x7f0384d33160, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7853
      #9  0x0000562f80f4abd0 in dispatch_command (command=COM_QUERY, thd=0x7f0374000af0, packet=0x7f0374136171 "KILL ( SELECT 1 ) + LASTVAL(s)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
      #10 0x0000562f80f4925d in do_command (thd=0x7f0374000af0) at /data/src/10.4/sql/sql_parse.cc:1360
      #11 0x0000562f810d270f in do_handle_one_connection (connect=0x562f8382f530) at /data/src/10.4/sql/sql_connect.cc:1412
      #12 0x0000562f810d245e in handle_one_connection (arg=0x562f8382f530) at /data/src/10.4/sql/sql_connect.cc:1316
      #13 0x0000562f81adad6d in pfs_spawn_thread (arg=0x562f837432a0) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #14 0x00007f038cb124a4 in start_thread (arg=0x7f0384d34700) at pthread_create.c:456
      #15 0x00007f038ac46d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.4-10.5 debug builds.
      Doesn't seem to be reproducible on 10.3 (debug release, or asan) or on 10.4-10.5 non-debug builds.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            commit 6b78dc22569f5015afad2a84b8b8d42810992ac1
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date: Fri Jul 24 09:59:38 2020 +0200

            MDEV-21998: Server crashes in st_select_lex::add_table_to_list upon mix of KILL and sequences

            Continue support the hack of current select equal builtin select if
            selects stack is empty even after subselects.

            sanja Oleksandr Byelkin added a comment - commit 6b78dc22569f5015afad2a84b8b8d42810992ac1 Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Fri Jul 24 09:59:38 2020 +0200 MDEV-21998 : Server crashes in st_select_lex::add_table_to_list upon mix of KILL and sequences Continue support the hack of current select equal builtin select if selects stack is empty even after subselects.
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Alexander Barkov [ bar ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            bar Alexander Barkov added a comment - The patch https://github.com/MariaDB/server/commit/6b78dc22569f5015afad2a84b8b8d42810992ac1 is OK to push.
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Fix Version/s 10.4.14 [ 24305 ]
            Fix Version/s 10.5.5 [ 24423 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            sanja Oleksandr Byelkin made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 105900 ] MariaDB v4 [ 157459 ]

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.