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

Server crashes in MYSQLparse upon IF with double brackets

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Duplicate
    • 10.4(EOL), 10.5
    • 10.4.16, 10.5.7
    • Parser
    • None

    Description

      For MTR

      --delimiter $
      query IF AVG( ( SELECT 1 ) ) THEN 1 ; END IF $
      --delimiter ;
      

      For client

      DELIMITER $
      IF AVG( ( SELECT 1 ) ) THEN 1 ; END IF $
      DELIMITER ;
      

      10.4 efc97eff

      #3  <signal handler called>
      #4  0x000055f0dc3b60eb in MYSQLparse (thd=0x7f3610000af0) at /data/src/10.4/sql/sql_yacc.yy:11922
      #5  0x000055f0dc11203a in parse_sql (thd=0x7f3610000af0, parser_state=0x7f36229cb160, creation_ctx=0x0, do_pfs_digest=true) at /data/src/10.4/sql/sql_parse.cc:10206
      #6  0x000055f0dc10c85e in mysql_parse (thd=0x7f3610000af0, rawbuf=0x7f36100132f0 "IF AVG( ( SELECT 1 ) ) THEN 1 ; END IF", length=38, parser_state=0x7f36229cb160, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7853
      #7  0x000055f0dc0f7bd0 in dispatch_command (command=COM_QUERY, thd=0x7f3610000af0, packet=0x7f3610136171 "IF AVG( ( SELECT 1 ) ) THEN 1 ; END IF ", packet_length=39, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
      #8  0x000055f0dc0f625d in do_command (thd=0x7f3610000af0) at /data/src/10.4/sql/sql_parse.cc:1360
      #9  0x000055f0dc27f70f in do_handle_one_connection (connect=0x55f0dfe0b510) at /data/src/10.4/sql/sql_connect.cc:1412
      #10 0x000055f0dc27f45e in handle_one_connection (arg=0x55f0dfe0b510) at /data/src/10.4/sql/sql_connect.cc:1316
      #11 0x000055f0dcc87db3 in pfs_spawn_thread (arg=0x55f0dfd1f4a0) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #12 0x00007f362a7aa4a4 in start_thread (arg=0x7f36229cc700) at pthread_create.c:456
      #13 0x00007f36288ded0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.4, 10.5, debug, non-debug and ASAN alike.
      Not reproducible on 10.3.

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              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.