List:Commits« Previous MessageNext Message »
From:tim Date:September 15 2006 5:13am
Subject:bk commit into 5.0 tree (tsmith:1.2264)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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:13:52-06:00, tsmith@stripped +2 -0
  Merge siva.hindu.god:/usr/home/tim/m/bk/tmp/41
  into  siva.hindu.god:/usr/home/tim/m/bk/tmp/50
  MERGE: 1.1616.2734.4

  mysys/charset.c@stripped, 2006-09-14 21:11:03-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.135.1.9

  mysys/my_read.c@stripped, 2006-09-14 21:13:44-06:00, tsmith@stripped +0 -2
    Manual merge
    MERGE: 1.7.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:	tsmith
# Host:	siva.hindu.god
# Root:	/usr/home/tim/m/bk/tmp/50/RESYNC

--- 1.147/mysys/charset.c	2006-09-14 21:13:58 -06:00
+++ 1.148/mysys/charset.c	2006-09-14 21:13:58 -06:00
@@ -312,7 +312,7 @@ static my_bool my_read_charset_file(cons
 {
   char *buf;
   int  fd;
-  uint len;
+  uint len, tmp_len;
   MY_STAT stat_info;
   
   if (!my_stat(filename, &stat_info, MYF(myflags)) ||
@@ -321,12 +321,11 @@ static my_bool my_read_charset_file(cons
     return TRUE;
   
   if ((fd=my_open(filename,O_RDONLY,myflags)) < 0)
-  {
-    my_free(buf,myflags);
-    return TRUE;
-  }
-  len=read(fd,buf,len);
+    goto error;
+  tmp_len=my_read(fd, buf, len, myflags);
   my_close(fd,myflags);
+  if (tmp_len != len)
+    goto error;
   
   if (my_parse_charset_xml(buf,len,add_collation))
   {
@@ -340,6 +339,10 @@ static my_bool my_read_charset_file(cons
   
   my_free(buf, myflags);  
   return FALSE;
+
+error:
+  my_free(buf, myflags);
+  return TRUE;
 }
 
 

--- 1.8/mysys/my_read.c	2006-09-14 21:13:58 -06:00
+++ 1.9/mysys/my_read.c	2006-09-14 21:13:58 -06:00
@@ -51,9 +51,10 @@ 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 ((int) readbytes <= 0 && errno == EINTR)
-      {
-        DBUG_PRINT("debug", ("my_read() was interrupted and returned %d", (int)
readbytes));
+      if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
+      {  
+        DBUG_PRINT("debug", ("my_read() was interrupted and returned %d",
+                             (int) readbytes));
         continue;				/* Interrupted */
       }
 #endif
Thread
bk commit into 5.0 tree (tsmith:1.2264)tim15 Sep