#At file:///ext/mysql/bzr/backup/stream-doc/ based on revid:rafal.somla@stripped
2869 Rafal Somla 2009-09-08
Followup patch for BUG#40587. It moves definitions of functions
bstream_{rd,wr}_summary() in backup/stream_v1.c so that they are
defined at the place where summary block format is described in
the documentation. This is so that it is easy to verify that
functions correctly implement the described format.
modified:
sql/backup/stream_v1.c
=== modified file 'sql/backup/stream_v1.c'
--- a/sql/backup/stream_v1.c 2009-09-08 06:43:02 +0000
+++ b/sql/backup/stream_v1.c 2009-09-08 07:03:44 +0000
@@ -329,57 +329,6 @@ int bstream_rd_binlog_pos(backup_stream
return ret;
}
-/**
- Write backup image summary.
-
- This function assumes that all members of the header (such as @c vp_time) are
- already filled. It also stores the 0x00 byte separating summary from the
- preceding table data chunks.
-
- @see @ref summary
-*/
-int bstream_wr_summary(backup_stream *s, struct st_bstream_image_header *hdr)
-{
- int ret= BSTREAM_OK;
-
- CHECK_WR_RES(bstream_wr_byte(s,0x00));
- CHECK_WR_RES(bstream_wr_time(s,&hdr->vp_time));
- CHECK_WR_RES(bstream_wr_time(s,&hdr->end_time));
- CHECK_WR_RES(bstream_wr_binlog_pos(s,hdr->binlog_info));
- CHECK_WR_RES(bstream_wr_binlog_pos(s,hdr->binlog_group));
-
- wr_error:
-
- return ret;
-}
-
-/**
- Read backup image summary
-
- The information stored in the summary section is read and stored in the image
- header structure.
-
- @retval BSTREAM_ERROR Error while reading
- @retval BSTREAM_OK Read successful
- @retval BSTREAM_EOC Read successful and end of chunk has been reached
- @retval BSTREAM_EOS Read successful and end of stream has been reached
-
- @see @ref summary
-*/
-int bstream_rd_summary(backup_stream *s, struct st_bstream_image_header *hdr)
-{
- int ret= BSTREAM_OK;
-
- CHECK_RD_OK(bstream_rd_time(s,&hdr->vp_time));
- CHECK_RD_OK(bstream_rd_time(s,&hdr->end_time));
- CHECK_RD_OK(bstream_rd_binlog_pos(s,&hdr->binlog_info));
- CHECK_RD_RES(bstream_rd_binlog_pos(s,&hdr->binlog_group));
-
- rd_error:
-
- return ret;
-}
-
/*************************************************************************
*
@@ -2178,6 +2127,57 @@ int bstream_rd_data_chunk(backup_stream
future use.
*/
+/**
+ Write backup image summary.
+
+ This function assumes that all members of the header (such as @c vp_time) are
+ already filled. It also stores the 0x00 byte separating summary from the
+ preceding table data chunks.
+
+ @see @ref summary
+*/
+int bstream_wr_summary(backup_stream *s, struct st_bstream_image_header *hdr)
+{
+ int ret= BSTREAM_OK;
+
+ CHECK_WR_RES(bstream_wr_byte(s,0x00));
+ CHECK_WR_RES(bstream_wr_time(s,&hdr->vp_time));
+ CHECK_WR_RES(bstream_wr_time(s,&hdr->end_time));
+ CHECK_WR_RES(bstream_wr_binlog_pos(s,hdr->binlog_info));
+ CHECK_WR_RES(bstream_wr_binlog_pos(s,hdr->binlog_group));
+
+ wr_error:
+
+ return ret;
+}
+
+/**
+ Read backup image summary
+
+ The information stored in the summary section is read and stored in the image
+ header structure.
+
+ @retval BSTREAM_ERROR Error while reading
+ @retval BSTREAM_OK Read successful
+ @retval BSTREAM_EOC Read successful and end of chunk has been reached
+ @retval BSTREAM_EOS Read successful and end of stream has been reached
+
+ @see @ref summary
+*/
+int bstream_rd_summary(backup_stream *s, struct st_bstream_image_header *hdr)
+{
+ int ret= BSTREAM_OK;
+
+ CHECK_RD_OK(bstream_rd_time(s,&hdr->vp_time));
+ CHECK_RD_OK(bstream_rd_time(s,&hdr->end_time));
+ CHECK_RD_OK(bstream_rd_binlog_pos(s,&hdr->binlog_info));
+ CHECK_RD_RES(bstream_rd_binlog_pos(s,&hdr->binlog_group));
+
+ rd_error:
+
+ return ret;
+}
+
/*********************************************************************
*
Attachment: [text/bzr-bundle] bzr/rafal.somla@sun.com-20090908070344-lf6893fk4lzatv68.bundle
| Thread |
|---|
| • bzr commit into mysql-6.0-backup branch (Rafal.Somla:2869) Bug#40587 | Rafal Somla | 8 Sep |