MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:holyfoot Date:August 7 2006 3:12pm
Subject:bk commit into 4.1 tree (holyfoot:1.2530) BUG#12620
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf 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-07 20:12:15+05:00, holyfoot@stripped +2 -0
  bug #12620 (UTF-8 indexing on a remote volume causes ER_NO_KEYFILE error)
  
  The problem is that 'read' and 'write' functions on MacOSX can
  return -1 instead of expected 0 being called with 0 bytes to
  read/write.
  So i added code to not to call these at all in this case.

  mysys/my_read.c@stripped, 2006-08-07 20:12:12+05:00, holyfoot@stripped +9 -0
    fix for MacOCX

  mysys/my_write.c@stripped, 2006-08-07 20:12:12+05:00, holyfoot@stripped +9 -0
    fix for MacOSX

# 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:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-4.1.12620

--- 1.7/mysys/my_read.c	2006-08-07 20:12:19 +05:00
+++ 1.8/mysys/my_read.c	2006-08-07 20:12:19 +05:00
@@ -45,6 +45,15 @@
   for (;;)
   {
     errno=0;					/* Linux doesn't reset this */
+#ifdef __APPLE__
+    /* MacOSX can return -1 from the read function if the Count is 0 */
+    /* so we have to handle it separately here                       */
+    if (!Count)
+    {
+      readbytes= 0;
+      break;
+    }
+#endif
     if ((readbytes = (uint) read(Filedes, Buffer, Count)) != Count)
     {
       my_errno=errno ? errno : -1;

--- 1.11/mysys/my_write.c	2006-08-07 20:12:19 +05:00
+++ 1.12/mysys/my_write.c	2006-08-07 20:12:19 +05:00
@@ -32,6 +32,15 @@
 
   for (;;)
   {
+#ifdef __APPLE__
+    /* MacOSX can return -1 from the write function if the Count is 0 */
+    /* so we have to handle it separately here                        */
+    if (!Count)
+    {
+      writenbytes= 0;
+      break;
+    }
+#endif
     if ((writenbytes = (uint) write(Filedes, Buffer, Count)) == Count)
       break;
     if ((int) writenbytes != -1)
Thread
bk commit into 4.1 tree (holyfoot:1.2530) BUG#12620holyfoot7 Aug