List:Commits« Previous MessageNext Message »
From:Jørgen Løland Date:September 8 2008 2:58pm
Subject:Re: bzr commit into mysql-6.0-backup branch (rsomla:2691) Bug#37522
View as plain text  
Rafal,

The patch looks good and is approved. I have one very minor
suggestion you may consider, but it is not a required change:

Requirements:
-------------
None

Suggestions:
-----------
The added ERROR check and handling is written in at three
different ways.

For as_read
+    if (ret == BSTREAM_ERROR)
+    {
+      s->state= ERROR;
+      return BSTREAM_ERROR;
+    }

For as_write
+    if (ret != BSTREAM_OK)
+    {
+      s->state= ERROR;
+      return BSTREAM_ERROR;
+    }
(...)
      if (ret != BSTREAM_OK)
+    {
+      s->state= ERROR;
        return ret;
+    }

They could all use the pattern used after as_read:

if (ret == BSTREAM_ERROR)
{
   s->state= ERROR;
   return BSTREAM_ERROR;
}


Rafal Somla wrote:
> #At file:///ext/mysql/bzr/backup/bug37522/
> 
>  2691 Rafal Somla	2008-09-04
>       BUG#37522 (Backup: stream_v1_transport: Error condition should be checked for
> as_* calls)
>       
>       This patch adds checks for errors in stream_v1_transport.c where the low level
> I/O 
>       functions are called.
> modified:
>   sql/backup/stream_v1.h
>   sql/backup/stream_v1_transport.c
> 
> per-file messages:
>   sql/backup/stream_v1.h
>     Add specifications for the low-level I/O functions implementing abstract stream
>     interface.
>   sql/backup/stream_v1_transport.c
>     - Make sure error is reported and stream state set to ERROR whenever the
> low-level I/O functions report error.
>     - Turn append_to_buffer() into void function as it can never error.

Thread
bzr commit into mysql-6.0-backup branch (rsomla:2691) Bug#37522Rafal Somla4 Sep
  • Re: bzr commit into mysql-6.0-backup branch (rsomla:2691) Bug#37522Jørgen Løland8 Sep
  • Re: bzr commit into mysql-6.0-backup branch (rsomla:2691) Bug#37522Øystein Grøvlen9 Sep
    • Re: bzr commit into mysql-6.0-backup branch (rsomla:2691) Bug#37522Rafal Somla10 Sep