List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:August 23 2006 2:47pm
Subject:bk commit into 5.0 tree (cmiller:1.2251)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller 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, 2006-08-23 10:47:46-04:00, cmiller@stripped +1 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
  into  zippy.cornsilk.net:/home/cmiller/work/mysql/m50-maint-b21224
  MERGE: 1.2216.1.29

  client/mysql_upgrade.c@stripped, 2006-08-23 10:47:43-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.3.2.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:	cmiller
# Host:	zippy.cornsilk.net
# Root:	/home/cmiller/work/mysql/m50-maint-b21224/RESYNC

--- 1.5/client/mysql_upgrade.c	2006-08-23 10:47:49 -04:00
+++ 1.6/client/mysql_upgrade.c	2006-08-23 10:47:49 -04:00
@@ -157,17 +157,29 @@
   File our_defaults_file, defaults_file;
   char buffer[512];
   char *buffer_end;
+  int failed_to_open_count= 0;
   int error;
 
   /* check if the defaults file is needed at all */
   if (!opt_password)
     return 0;
 
-  defaults_file= my_open(path, O_BINARY | O_CREAT | O_WRONLY,
+retry_open:
+  defaults_file= my_open(path, O_BINARY | O_CREAT | O_WRONLY | O_EXCL,
                          MYF(MY_FAE | MY_WME));
 
   if (defaults_file < 0)
-    return 1;
+  {
+    if (failed_to_open_count == 0)
+    {
+      remove(path);
+      failed_to_open_count+= 1;
+      goto retry_open;
+    }
+    else
+      return 1;
+  }
+
   upgrade_defaults_created= 1;
   if (our_defaults_path)
   {
Thread
bk commit into 5.0 tree (cmiller:1.2251)Chad MILLER23 Aug