List:Internals« Previous MessageNext Message »
From:Mats Kindahl Date:February 1 2005 8:26pm
Subject:bk commit into 5.0 tree (mats:1.1816)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of mats. When mats 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1816 05/02/01 21:26:38 mats@stripped +1 -0
  Bug#7853 (mysqlbinlog does not accept input from stdin)
    The 'mysqlbinlog' utility now accept input from stdin.
    The behaviour is identical to providing the binary log as argument
    to the utility.

  client/mysqlbinlog.cc
    1.103 05/02/01 21:26:34 mats@stripped +3 -5
    Reading from stdin instead of stdout [sic]. Not setting position in file
    since my_b_read does that correctly.

# 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:	mats
# Host:	romeo.kindahl.net
# Root:	/home/bk/b7853-mysql-5.0

--- 1.102/client/mysqlbinlog.cc	2005-01-26 09:54:05 +01:00
+++ 1.103/client/mysqlbinlog.cc	2005-02-01 21:26:34 +01:00
@@ -1121,15 +1121,15 @@
     }
     check_header(file, &description_event);
   }
-  else // reading from stdin; TODO: check that it works
+  else // reading from stdin;
   {
-    if (init_io_cache(file, fileno(result_file), 0, READ_CACHE, (my_off_t) 0,
+    if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
 		      0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
       return 1;
     check_header(file, &description_event);
     if (start_position)
     {
-      /* skip 'start_position' characters from stdout */
+      /* skip 'start_position' characters from stdin */
       byte buff[IO_SIZE];
       my_off_t length,tmp;
       for (length= start_position_mot ; length > 0 ; length-=tmp)
@@ -1142,8 +1142,6 @@
         }
       }
     }
-    file->pos_in_file= start_position_mot;
-    file->seek_not_done=0;
   }
 
   if (!description_event || !description_event->is_valid())
Thread
bk commit into 5.0 tree (mats:1.1816)Mats Kindahl1 Feb