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

Procedure call with boolean expression parameter using more than one exists function crash the server

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4.28, 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.4, 11.8
    • 10.5, 10.6, 10.11, 11.4, 11.8
    • None
    • Red Hat Enterprise Linux release 8.7 (Ootpa)

    Description

      After upgrading from 10.4.25 to 10.4.28 the call of a procedure using booelan parameter with multiple existsf does not work and make the server crash.

      The error log shows that server restarts but there is no stack trace or other information.

      Steps to reproduce:

      create or replace schema bug_boolean_parameter;

      use bug_boolean_parameter;

      create table table_1
      (
      id bigint not null,
      primary key (id)
      );

      delimiter #

      create procedure proc_1(param_1 boolean)
      begin
      select param_1;
      end#

      delimiter ;

      call proc_1(exists(select * from table_1)); – works fine
      call proc_1(exists(select * from table_1) or exists(select * from table_1)); – crashes

      drop schema bug_boolean_parameter;

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa added a comment -

            Thank you for the report!
            I repeated on 10.4-10.11, 11,0 as described.
            Regression appeared in 10.4.26 after

            Revision #f439cfdf93 2022-07-12 17:18:48 +0700
            MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
            

            CREATE TABLE t1 (id int);
            create procedure proc_1(param_1 boolean) select param_1;
             
            call proc_1(exists(select * from t1) or exists(select * from t1)); 
            

            230516 18:28:17 [ERROR] mysqld got signal 11 ;
             
            Server version: 10.4.30-MariaDB-debug-log source revision: b7b8a9ee439f8d3c9457a6eb480001cae37307b8
             
            sql/signal_handler.cc:238(handle_fatal_signal)[0x55fca9388ec9]
            sigaction.c:0(__restore_rt)[0x7f2c65143420]
            sql/item_subselect.cc:122(Item_subselect::init(st_select_lex*, select_result_interceptor*))[0x55fca95b6dff]
            sql/item_subselect.cc:1514(Item_exists_subselect::Item_exists_subselect(THD*, st_select_lex*))[0x55fca95c4943]
            sql/sql_yacc.yy:10610(MYSQLparse(THD*))[0x55fca921d05d]
            sql/sql_parse.cc:10400(parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool))[0x55fca8bfb749]
            sql/sql_parse.cc:7960(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55fca8bec027]
            sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55fca8bc2973]
            sql/sql_parse.cc:1378(do_command(THD*))[0x55fca8bbf4a8]
            sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x55fca8fcc581]
            sql/sql_connect.cc:1325(handle_one_connection)[0x55fca8fcbe25]
            perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55fca9c71364]
            nptl/pthread_create.c:478(start_thread)[0x7f2c65137609]
             
            Query (0x62b0000b6290): call proc_1(exists(select * from t1) or exists(select * from t1))
            
            

            alice Alice Sherepa added a comment - Thank you for the report! I repeated on 10.4-10.11, 11,0 as described. Regression appeared in 10.4.26 after Revision #f439cfdf93 2022-07-12 17:18:48 +0700 MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP CREATE TABLE t1 (id int ); create procedure proc_1(param_1 boolean) select param_1;   call proc_1(exists( select * from t1) or exists( select * from t1)); 230516 18:28:17 [ERROR] mysqld got signal 11 ;   Server version: 10.4.30-MariaDB-debug-log source revision: b7b8a9ee439f8d3c9457a6eb480001cae37307b8   sql/signal_handler.cc:238(handle_fatal_signal)[0x55fca9388ec9] sigaction.c:0(__restore_rt)[0x7f2c65143420] sql/item_subselect.cc:122(Item_subselect::init(st_select_lex*, select_result_interceptor*))[0x55fca95b6dff] sql/item_subselect.cc:1514(Item_exists_subselect::Item_exists_subselect(THD*, st_select_lex*))[0x55fca95c4943] sql/sql_yacc.yy:10610(MYSQLparse(THD*))[0x55fca921d05d] sql/sql_parse.cc:10400(parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool))[0x55fca8bfb749] sql/sql_parse.cc:7960(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55fca8bec027] sql/sql_parse.cc:1860(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55fca8bc2973] sql/sql_parse.cc:1378(do_command(THD*))[0x55fca8bbf4a8] sql/sql_connect.cc:1420(do_handle_one_connection(CONNECT*))[0x55fca8fcc581] sql/sql_connect.cc:1325(handle_one_connection)[0x55fca8fcbe25] perfschema/pfs.cc:1871(pfs_spawn_thread)[0x55fca9c71364] nptl/pthread_create.c:478(start_thread)[0x7f2c65137609]   Query (0x62b0000b6290): call proc_1(exists(select * from t1) or exists(select * from t1))

            People

              shulga Dmitry Shulga
              marc.langevin@usherbrooke.ca Marc
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.