List:Commits« Previous MessageNext Message »
From:tim Date:September 15 2006 3:06am
Subject:bk commit into 4.1 tree (tsmith:1.2541)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of tim. When tim 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-09-14 21:06:43-06:00, tsmith@stripped +4 -0
  Merge siva.hindu.god:/usr/home/tim/m/bk/tmp/40
  into  siva.hindu.god:/usr/home/tim/m/bk/tmp/41
  MERGE: 1.1346.1.840

  mysys/my_lwrite.c@stripped, 2006-09-14 21:06:41-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.5.1.1

  mysys/my_pread.c@stripped, 2006-09-14 21:06:41-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.8.1.2

  mysys/my_read.c@stripped, 2006-09-14 21:06:41-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.6.1.1

  mysys/my_write.c@stripped, 2006-09-14 21:06:41-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.8.1.3

# 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:	tsmith
# Host:	siva.hindu.god
# Root:	/usr/home/tim/m/bk/tmp/41/RESYNC

--- 1.6/mysys/my_lwrite.c	2006-09-14 21:06:48 -06:00
+++ 1.7/mysys/my_lwrite.c	2006-09-14 21:06:48 -06:00
@@ -26,6 +26,8 @@ uint32 my_lwrite(int Filedes, const byte
   DBUG_PRINT("my",("Fd: %d  Buffer: 0x%lx  Count: %ld  MyFlags: %d",
 		   Filedes, Buffer, Count, MyFlags));
 
+  DBUG_PRINT("error", ("Deprecated my_lwrite() function should not be used."));
+
   /* Temp hack to get count to int32 while write wants int */
   if ((writenbytes = (uint32) write(Filedes, Buffer, (uint) Count)) != Count)
   {

--- 1.10/mysys/my_pread.c	2006-09-14 21:06:48 -06:00
+++ 1.11/mysys/my_pread.c	2006-09-14 21:06:48 -06:00
@@ -52,8 +52,12 @@ uint my_pread(File Filedes, byte *Buffer
       DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
 			    readbytes,Count,Filedes,my_errno));
 #ifdef THREAD
-      if (readbytes == 0 && errno == EINTR)
-	continue;				/* Interrupted */
+      if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
+      {
+        DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d",
+                             (int) readbytes));
+        continue;                              /* Interrupted */
+      }
 #endif
       if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
       {
@@ -124,8 +128,8 @@ uint my_pwrite(int Filedes, const byte *
       VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
       continue;
     }
-    if ((writenbytes == 0 && my_errno == EINTR) ||
-	(writenbytes > 0 && (uint) writenbytes != (uint) -1))
+    if ((writenbytes > 0 && (uint) writenbytes != (uint) -1) ||
+        my_errno == EINTR)
       continue;					/* Retry */
 #endif
     if (MyFlags & (MY_NABP | MY_FNABP))

--- 1.7/mysys/my_read.c	2006-09-14 21:06:48 -06:00
+++ 1.8/mysys/my_read.c	2006-09-14 21:06:48 -06:00
@@ -51,8 +51,12 @@ uint my_read(File Filedes, byte *Buffer,
       DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
 			    readbytes,Count,Filedes,my_errno));
 #ifdef THREAD
-      if (readbytes == 0 && errno == EINTR)
-	continue;				/* Interrupted */
+      if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
+      {  
+        DBUG_PRINT("debug", ("my_read() was interrupted and returned %d",
+                             (int) readbytes));
+        continue;                              /* Interrupted */
+      }
 #endif
       if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
       {

--- 1.11/mysys/my_write.c	2006-09-14 21:06:48 -06:00
+++ 1.12/mysys/my_write.c	2006-09-14 21:06:48 -06:00
@@ -57,18 +57,24 @@ uint my_write(int Filedes, const byte *B
       VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
       continue;
     }
-    if (!writenbytes)
+
+    if ((writenbytes == 0 || (int) writenbytes == -1))
     {
-      /* We may come here on an interrupt or if the file quote is exeeded */
       if (my_errno == EINTR)
-	continue;
-      if (!errors++)				/* Retry once */
       {
-	errno=EFBIG;				/* Assume this is the error */
-	continue;
+        DBUG_PRINT("debug", ("my_write() was interrupted and returned %d",
+                             (int) writenbytes));
+        continue;                               /* Interrupted */
+      }
+
+      if (!writenbytes && !errors++)		/* Retry once */
+      {
+        /* We may come here if the file quota is exeeded */
+        errno=EFBIG;				/* Assume this is the error */
+        continue;
       }
     }
-    else if ((uint) writenbytes != (uint) -1)
+    else
       continue;					/* Retry */
 #endif
     if (MyFlags & (MY_NABP | MY_FNABP))
Thread
bk commit into 4.1 tree (tsmith:1.2541)tim15 Sep