List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:March 24 2007 8:24pm
Subject:bk commit into 5.1 tree (svoj:1.2500) BUG#24566
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj 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-03-25 00:24:39+04:00, svoj@stripped +1 -0
  BUG#24566 - Incorrect key file for table ( the size of table is more than 2G)
  Accessing a file that is bigger than 2G may report that read/write operation
  failed. This may affect anything that uses my_pread/my_pwrite functions, e.g.
  MyISAM, ARCHIVE, binary log.
  
  For MyISAM INSERT may report that table is crashed when writing to a table
  that is bigger than 2G.
  
  This is fixed by using proper offset type in my_pread/my_pwrite functions on
  systems that do not have native pread/pwrite calls.
  
  Affects systems that do not have native pread/pwrite calls, e.g. Windows.
  
  No test case for this fix, since it requires huge table.

  mysys/my_pread.c@stripped, 2007-03-25 00:24:37+04:00, svoj@stripped +4 -4
    Use proper offset type for restoring position on systems that do not have native
    pread/pwrite calls.

# 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:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG24566/mysql-5.1-engines

--- 1.17/mysys/my_pread.c	2007-03-25 00:24:46 +04:00
+++ 1.18/mysys/my_pread.c	2007-03-25 00:24:46 +04:00
@@ -37,7 +37,7 @@ uint my_pread(File Filedes, byte *Buffer
     errno=0;					/* Linux doesn't reset this */
 #endif
 #ifndef HAVE_PREAD
-    off_t old_offset;
+    os_off_t old_offset;
 
     pthread_mutex_lock(&my_file_info[Filedes].mutex);
     /*
@@ -45,7 +45,7 @@ uint my_pread(File Filedes, byte *Buffer
       before seeking to the given offset
     */
 
-    error= (old_offset= (off_t)lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
+    error= (old_offset= lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
            lseek(Filedes, offset, MY_SEEK_SET) == -1L;
 
     if (!error)                                 /* Seek was successful */
@@ -116,7 +116,7 @@ uint my_pwrite(int Filedes, const byte *
   {
 #ifndef HAVE_PREAD
     int error= 0;
-    off_t old_offset;
+    os_off_t old_offset;
     writenbytes= (uint) -1;
     pthread_mutex_lock(&my_file_info[Filedes].mutex);
 
@@ -124,7 +124,7 @@ uint my_pwrite(int Filedes, const byte *
       As we cannot change the file pointer, we save the old position,
       before seeking to the given offset
     */
-    error= ((old_offset= (off_t)lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
+    error= ((old_offset= lseek(Filedes, 0L, MY_SEEK_CUR)) == -1L ||
             lseek(Filedes, offset, MY_SEEK_SET) == -1L);
 
     if (!error)                                 /* Seek was successful */
Thread
bk commit into 5.1 tree (svoj:1.2500) BUG#24566Sergey Vojtovich24 Mar