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

Error return from external_lock make the server crash

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.1.22
    • Fix Version/s: 10.1.24, 10.0.31, 10.2.7
    • Component/s: Server
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              bertrandop Olivier Bertrand
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: