List:Commits« Previous MessageNext Message »
From:rsomla Date:May 29 2007 10:25am
Subject:bk commit into 5.1 tree (rafal:1.2529)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rafal. When rafal does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-05-29 10:25:09+02:00, rafal@quant.(none) +3 -0
  Merge quant.(none):/ext/mysql/bk/backup/prototype
  into  quant.(none):/ext/mysql/bk/backup/prototype-myisam
  MERGE: 1.2525.1.6

  sql/backup/data_backup.cc@stripped, 2007-05-29 10:25:06+02:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.15.1.2

  sql/backup/sql_backup.cc@stripped, 2007-05-29 10:25:06+02:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.27.1.1

  sql/mysqld.cc@stripped, 2007-05-29 10:25:06+02:00, rafal@quant.(none) +0 -0
    Auto merged
    MERGE: 1.612.1.1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	rafal
# Host:	quant.(none)
# Root:	/ext/mysql/bk/backup/prototype-myisam/RESYNC

--- 1.613/sql/mysqld.cc	2007-05-29 10:25:11 +02:00
+++ 1.614/sql/mysqld.cc	2007-05-29 10:25:11 +02:00
@@ -452,6 +452,8 @@
 my_bool opt_noacl;
 my_bool sp_automatic_privileges= 1;
 
+ulong backup_sleep= 0;
+
 ulong opt_binlog_rows_event_max_size;
 const char *binlog_format_names[]= {"STATEMENT", "ROW", "MIXED", NullS};
 TYPELIB binlog_format_typelib=

--- 1.29/sql/backup/sql_backup.cc	2007-05-29 10:25:11 +02:00
+++ 1.30/sql/backup/sql_backup.cc	2007-05-29 10:25:11 +02:00
@@ -25,8 +25,7 @@
 #include "meta_backup.h"
 #include "archive.h"
 #include "be_default.h"
-
-#define TEST  yes
+#include "debug.h"
 
 //int sortcmp(const String *s,const String *t, CHARSET_INFO *cs);
 
@@ -55,6 +54,8 @@
   DBUG_ENTER("execute_backup_command");
   DBUG_ASSERT(thd && lex);
 
+  BACKUP_SYNC("backup_command");
+
   backup::Location *loc= backup::Location::find(lex->backup_dir);
 
   if (!loc)
@@ -76,9 +77,8 @@
 
     if (lex->sql_command == SQLCOM_SHOW_ARCHIVE)
     {
-#     ifndef TEST
-      res= mysql_show_archive(thd,info);
-#     endif
+      // FIXME: implement this
+      // res= mysql_show_archive(thd,info);
       ::send_ok(thd);
     }
     else
@@ -179,6 +179,8 @@
 
   size_t start_bytes= s.bytes;
 
+  BACKUP_SYNC("backup_meta");
+
   DBUG_PRINT("backup",("Writing image header"));
 
   info.save(s);
@@ -187,12 +189,15 @@
 
   backup::write_meta_data(thd,info,s);
 
-  DBUG_PRINT("backup",("Writing table"));
+  DBUG_PRINT("backup",("Writing table data"));
+
+  BACKUP_SYNC("backup_data");
 
   if(!backup::write_table_data(thd,info,s))
     goto error;
 
   DBUG_PRINT("backup",("Backup done."));
+  BACKUP_SYNC("backup_done");
 
   info.total_size= s.bytes - start_bytes;
 

--- 1.17/sql/backup/data_backup.cc	2007-05-29 10:25:11 +02:00
+++ 1.18/sql/backup/data_backup.cc	2007-05-29 10:25:11 +02:00
@@ -387,6 +387,15 @@
   DBUG_PRINT("backup/data",("-- PREPARE PHASE --"));
   BACKUP_SYNC("data_prepare");
 
+#if 0
+  /*
+    when I want to test if this backup works in an "online" situation (while
+    updates happen), I add a sleep here so that I can fire a concurrent UPDATE
+    in another connection.
+  */
+  sleep(5);
+#endif
+
   sch.prepare();
 
   while (sch.prepare_count > 0)
@@ -1140,7 +1149,8 @@
       continue;
 
     DBUG_PRINT("restore",("Shutting down driver %u",no));
-    drv[no]->end();
+    if (drv[no]->end() != backup::OK)
+      DBUG_ASSERT(0);
     drv[no]->free();
   }
 
Thread
bk commit into 5.1 tree (rafal:1.2529)rsomla29 May