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

Error return from external_lock make the server crash

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.1.22
    • 10.1.24, 10.0.31, 10.2.7
    • Server
    • None
    • Windows

    Description

      This is due to:

      Assertion failed: m_lock_type == 3, file C:\MariaDB-10.1\MariaDB\sql\handler.cc, line 2564
      by
        DBUG_ASSERT(m_lock_type == F_UNLCK);
      

      Indeed, the m_lock_type variable is declared and described in handler.h as:

       
      private:
        /**
          The lock type set by when calling::ha_external_lock(). This is 
          propagated down to the storage engine. The reason for also storing 
          it here, is that when doing MRR we need to create/clone a second handler
          object. This cloned handler object needs to know about the lock_type used.
        */
        int m_lock_type;
      

      However, external_lock can be called in handler::ha_external_lock line 5828 with lock_type set to F_UNLCK but with this variable not having been set and still having a different value. On return, this function does set it line 5835 but only when there is no error.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            bertrandop Olivier Bertrand
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.