← Back to team overview

maria-developers team mailing list archive

Re: fb29c886701: Handle errors from external_unlock & mysql_unlock_tables

 

Hi, Michael!

On Apr 13, Michael Widenius wrote:
> revision-id: fb29c886701 (mariadb-10.5.2-123-gfb29c886701)
> parent(s): 22fb7f8995c
> author: Michael Widenius <monty@xxxxxxxxxxx>
> committer: Michael Widenius <monty@xxxxxxxxxxx>
> timestamp: 2020-04-09 01:37:02 +0300
> message:
> 
> Handle errors from external_unlock & mysql_unlock_tables
>
> Other things:
> - Handler errors from ha_maria::implict_commit
> - Disable DBUG in safe_mutex_lock to get trace file easier to read
> 
> diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c
> index 4f495048f63..f32132136b8 100644
> --- a/mysys/thr_mutex.c
> +++ b/mysys/thr_mutex.c
> @@ -233,6 +233,7 @@ int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
>    int error;
>    DBUG_PRINT("mutex", ("%s (0x%lx) locking", mp->name ? mp->name : "Null",
>                         (ulong) mp));
> +  DBUG_PUSH("");
>  
>    pthread_mutex_lock(&mp->global);
>    if (!mp->file)
> @@ -283,7 +284,7 @@ int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
>    {
>      error= pthread_mutex_trylock(&mp->mutex);
>      if (error == EBUSY)
> -      return error;
> +      goto end;
>    }
>    else
>      error= pthread_mutex_lock(&mp->mutex);
> @@ -393,6 +394,8 @@ int safe_mutex_lock(safe_mutex_t *mp, myf my_flags, const char *file,
>      }
>    }
>  
> +end:
> +  DBUG_POP();
>    DBUG_PRINT("mutex", ("%s (0x%lx) locked", mp->name, (ulong) mp));

this message is no longer always correct, is it?

>    return error;
>  }

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


Follow ups