List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:May 6 2005 6:19pm
Subject:bk commit into 5.0 tree (jimw:1.1930) BUG#8271
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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
  1.1930 05/05/06 09:19:21 jimw@stripped +3 -0
  Avoid calling my_seek() on logs opened with O_APPEND. (Bug #8271)

  sql/log.cc
    1.161 05/05/06 08:42:22 jimw@stripped +2 -1
    Indicate to iocache that we opened file with O_APPEND

  mysys/mf_iocache.c
    1.51 05/05/06 08:40:01 jimw@stripped +2 -1
    If we opened with append, we never need to seek

  include/my_sys.h
    1.153 05/05/06 08:39:37 jimw@stripped +1 -0
    Add new value for IO_CACHE myflags

# 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:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-5.0-8271b

--- 1.152/include/my_sys.h	2005-05-06 03:42:16 -07:00
+++ 1.153/include/my_sys.h	2005-05-06 08:39:37 -07:00
@@ -57,6 +57,7 @@
 #define MY_IGNORE_BADFD 32      /* my_sync: ignore 'bad descriptor' errors */
 #define MY_RAID         64      /* Support for RAID */
 #define MY_FULL_IO     512      /* For my_read - loop intil I/O is complete */
+#define MY_WRITE_APPEND 512     /* For file append with O_APPEND */
 #define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
 #define MY_LINK_WARNING 32	/* my_redel() gives warning if links */
 #define MY_COPYTIME	64	/* my_redel() copys time */

--- 1.50/mysys/mf_iocache.c	2005-03-08 08:12:08 -08:00
+++ 1.51/mysys/mf_iocache.c	2005-05-06 08:40:01 -07:00
@@ -1142,7 +1142,8 @@
 	If we have append cache, we always open the file with
 	O_APPEND which moves the pos to EOF automatically on every write
       */
-      if (!append_cache && info->seek_not_done)
+      if (!append_cache && !(info->myflags & MY_WRITE_APPEND) &&
+          info->seek_not_done)
       {					/* File touched, do seek */
 	if (my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) ==
 	    MY_FILEPOS_ERROR)

--- 1.160/sql/log.cc	2005-04-22 15:05:00 -07:00
+++ 1.161/sql/log.cc	2005-05-06 08:42:22 -07:00
@@ -538,7 +538,8 @@
       init_io_cache(&log_file, file, IO_SIZE, io_cache_type,
 		    my_tell(file,MYF(MY_WME)), 0, 
                     MYF(MY_WME | MY_NABP |
-                        ((log_type == LOG_BIN) ? MY_WAIT_IF_FULL : 0))))
+                        ((log_type == LOG_BIN) ? MY_WAIT_IF_FULL :
+                         MY_WRITE_APPEND))))
     goto err;
 
   switch (log_type) {
Thread
bk commit into 5.0 tree (jimw:1.1930) BUG#8271Jim Winstead6 May