List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:February 18 2009 7:59am
Subject:bzr commit into mysql-6.0-backup branch (Rafal.Somla:2773) Bug#42959
View as plain text  
#At file:///ext/mysql/bzr/mysql-6.0-backup/

 2773 Rafal Somla	2009-02-18
      Bug#42959 - Wrong logic in backup stream library when saving object metadata
      
      Fixing the logic by removing incorrect gotos. Also uncommenting the 
      call to bcat_get_item_create_data() function.
modified:
  sql/backup/stream_v1.c

per-file messages:
  sql/backup/stream_v1.c
    Remove wrong "goto wr_error" and add some more comments  to the code.
=== modified file 'sql/backup/stream_v1.c'
--- a/sql/backup/stream_v1.c	2009-02-11 08:12:45 +0000
+++ b/sql/backup/stream_v1.c	2009-02-18 07:59:36 +0000
@@ -1629,21 +1629,24 @@ int bstream_wr_item_def(backup_stream *s
   data.end= 0;
   query.begin= 0;
   query.end= 0;
+
+  /* 
+    Fetch item's create query and/or extra create data. Note that
+    the BSTREAM_ERROR reply from bcat_get_item_create_*() functions
+    does not indicate an error but luck of the corresponding piece
+    of metadata.
+  */
+
   ret= bcat_get_item_create_query(cat,item,&query);
   if (ret == BSTREAM_OK) 
     flags |= BSTREAM_FLAG_HAS_CREATE_STMT;
-  else if (ret == BSTREAM_ERROR) 
-    goto wr_error;
 
-  /* bcat_get_item_create_data not in use yet. */
-  /*
   ret= bcat_get_item_create_data(cat,item,&data);
   if (ret == BSTREAM_OK)
     flags |= BSTREAM_FLAG_HAS_EXTRA_DATA;
-  else if (ret == BSTREAM_ERROR) 
-    goto wr_error;
-  */
   
+  /* save the header of metadata entry, containing item coordinates */
+
   ret= bstream_wr_meta_item(s,kind,flags,item);
   if (ret == BSTREAM_ERROR) 
     goto wr_error;

Thread
bzr commit into mysql-6.0-backup branch (Rafal.Somla:2773) Bug#42959Rafal Somla18 Feb