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

Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1(EOL)
    • 10.1.11
    • Parser
    • None
    • 10.1.10, 10.1.11, 10.1.12

    Description

      --disable_abort_on_error
      --query SELECT '
      --query b'

      Stack trace from 10.1 9d884fd3d3fadd5ad31ecfee915877b98258e546

      10.1/sql/sql_lex.cc:326: void Lex_input_stream::body_utf8_start(THD*, const char*): Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed.
      150813 18:36:21 [ERROR] mysqld got signal 6 ;
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f30c715a088): b'
      Connection ID (thread ID): 3
      Status: NOT_KILLED

      #6  0x00007f30cdd26311 in *__GI___assert_fail (assertion=0x7f30d0fb9960 "m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length", file=<optimized out>, line=326, function=0x7f30d0fbb5c0 "void Lex_input_stream::body_utf8_start(THD*, const char*)") at assert.c:81
      #7  0x00007f30d067e293 in Lex_input_stream::body_utf8_start (this=0x7f30c676b1a8, thd=0x7f30c7209070, begin_ptr=0x7f30c715a0f3 "\245\245\245\245\245 `\230\321\060\177") at 10.1/sql/sql_lex.cc:326
      #8  0x00007f30d09f35d7 in sp_head::set_body_start (this=0x7f30c93d1088, thd=0x7f30c7209070, begin_ptr=0x7f30c715a0f3 "\245\245\245\245\245 `\230\321\060\177") at 10.1/sql/sp_head.cc:719
      #9  0x00007f30d08604d6 in maybe_start_compound_statement (thd=0x7f30c7209070) at 10.1/sql/sql_yacc.yy:264
      #10 0x00007f30d0866dfa in MYSQLparse (thd=0x7f30c7209070) at 10.1/sql/sql_yacc.yy:3771
      #11 0x00007f30d06a3973 in parse_sql (thd=0x7f30c7209070, parser_state=0x7f30c676b1a0, creation_ctx=0x0, do_pfs_digest=true) at 10.1/sql/sql_parse.cc:9167
      #12 0x00007f30d069f883 in mysql_parse (thd=0x7f30c7209070, rawbuf=0x7f30c715a088 "b'", length=2, parser_state=0x7f30c676b1a0) at 10.1/sql/sql_parse.cc:7156
      #13 0x00007f30d068e8cd in dispatch_command (command=COM_QUERY, thd=0x7f30c7209070, packet=0x7f30cb3f9071 "b'", packet_length=2) at 10.1/sql/sql_parse.cc:1475
      #14 0x00007f30d068d5f3 in do_command (thd=0x7f30c7209070) at 10.1/sql/sql_parse.cc:1097
      #15 0x00007f30d07cf229 in do_handle_one_connection (thd_arg=0x7f30c7209070) at 10.1/sql/sql_connect.cc:1350
      #16 0x00007f30d07cef7a in handle_one_connection (arg=0x7f30c7209070) at 10.1/sql/sql_connect.cc:1262
      #17 0x00007f30d0d4fe8b in pfs_spawn_thread (arg=0x7f30cd423af0) at 10.1/storage/perfschema/pfs.cc:1860
      #18 0x00007f30cfd41b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #19 0x00007f30cddd695d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      #20 0x0000000000000000 in ?? ()

      Attachments

        Issue Links

          Activity

            Yes, the problem is sp_unlabeled_control which start doing somethoing without be sure that even one keyword fit to what we parse.

            sanja Oleksandr Byelkin added a comment - Yes, the problem is sp_unlabeled_control which start doing somethoing without be sure that even one keyword fit to what we parse.

            revision-id: daad4828b078485ee7ac60af4fc165ae35684395 (mariadb-10.1.9-21-gdaad482)
            parent(s): 59fcd7ff2315d007045eb987da5f21abbea6f6f1
            committer: Oleksandr Byelkin
            timestamp: 2015-12-21 20:13:12 +0100
            message:

            MDEV-8615: Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start

            If it is EOF then it may not be start of compound statement.

            sanja Oleksandr Byelkin added a comment - revision-id: daad4828b078485ee7ac60af4fc165ae35684395 (mariadb-10.1.9-21-gdaad482) parent(s): 59fcd7ff2315d007045eb987da5f21abbea6f6f1 committer: Oleksandr Byelkin timestamp: 2015-12-21 20:13:12 +0100 message: MDEV-8615 : Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start If it is EOF then it may not be start of compound statement. —

            (I am not sure that this fix is better)

            revision-id: 684bd68c33284f6106551188d9567f35b18593ed (mariadb-10.1.9-21-g684bd68)
            parent(s): 59fcd7ff2315d007045eb987da5f21abbea6f6f1
            committer: Oleksandr Byelkin
            timestamp: 2015-12-25 18:39:43 +0100
            message:

            MDEV-8615: Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start

            Nothing should be done before any keyword recognised.

            sanja Oleksandr Byelkin added a comment - (I am not sure that this fix is better) revision-id: 684bd68c33284f6106551188d9567f35b18593ed (mariadb-10.1.9-21-g684bd68) parent(s): 59fcd7ff2315d007045eb987da5f21abbea6f6f1 committer: Oleksandr Byelkin timestamp: 2015-12-25 18:39:43 +0100 message: MDEV-8615 : Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start Nothing should be done before any keyword recognised. —

            revision-id: 57bf58668877552ee43f4ed86689b8bbb3821c9c (mariadb-10.1.10-23-g57bf586)
            parent(s): 825f51d1aab51d363dc07ec9fe0829af33063883
            committer: Oleksandr Byelkin
            timestamp: 2016-01-27 00:38:36 +0100
            message:

            MDEV-8615: Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start

            Nothing should be done before any keyword recognized.

            sanja Oleksandr Byelkin added a comment - revision-id: 57bf58668877552ee43f4ed86689b8bbb3821c9c (mariadb-10.1.10-23-g57bf586) parent(s): 825f51d1aab51d363dc07ec9fe0829af33063883 committer: Oleksandr Byelkin timestamp: 2016-01-27 00:38:36 +0100 message: MDEV-8615 : Assertion `m_cpp_buf <= begin_ptr && begin_ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_start Nothing should be done before any keyword recognized. —

            ok to push!

            serg Sergei Golubchik added a comment - ok to push!

            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.