← Back to team overview

maria-developers team mailing list archive

Re: 7ce7184cf0e: MDEV-17133 dump thread reads from a past position

 

Hi, Andrei!

ok to push.
But please add a meaningful commit comment.
Thanks!

On Oct 19, Andrei Elkin wrote:
> revision-id: 7ce7184cf0e354a1c9114bb31df1fb63b1fbbcc7 (mariadb-10.1.35-59-g7ce7184cf0e)
> parent(s): d3a8b5aa9cee24a6397662e30df2e915f45460e0
> author: Andrei Elkin <andrei.elkin@xxxxxxxxxxx>
> committer: Andrei Elkin <andrei.elkin@xxxxxxxxxxx>
> timestamp: 2018-09-18 23:21:18 +0300
> message:
> 
> MDEV-17133 dump thread reads from a past position
> 
> ---
>  mysys/mf_iocache.c           |  8 +++--
>  unittest/sql/mf_iocache-t.cc | 74 +++++++++++++++++++++++++++++++++++++++++++-
>  2 files changed, 79 insertions(+), 3 deletions(-)
> 
> diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
> index 56b1ae3fc6e..8f829a8c9c2 100644
> --- a/mysys/mf_iocache.c
> +++ b/mysys/mf_iocache.c
> @@ -563,7 +563,7 @@ int _my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
>  
>  int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
>  {
> -  size_t length, diff_length, left_length= 0, max_length;
> +  size_t length= 0, diff_length, left_length= 0, max_length;
>    my_off_t pos_in_file;
>    DBUG_ENTER("_my_b_cache_read");
>  
> @@ -668,7 +668,11 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
>      else
>      {
>        info->error= 0;
> -      DBUG_RETURN(0);                           /* EOF */
> +      if (length == 0)
> +      {
> +        DBUG_RETURN(0);  // EOF
> +      }
> +      length= 0;
>      }
>    }
>    else if ((length= mysql_file_read(info->file,info->buffer, max_length,
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx