List:Internals« Previous MessageNext Message »
From:Mats Kindahl Date:February 1 2005 6:55pm
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 19:55:38 mats@stripped +1 -0
  Bug#7853 (mysqlbinlog does not accept input from stdin)
    The 'mysqlbinlog' program now accepts 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 19:55:33 mats@stripped +1 -18
    Reading from stdin instead of stdout [sic]. Removing explicit code to set read position and instead using the parameter to init_io_cache.

# 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 19:55:33 +01:00
@@ -1123,27 +1123,10 @@
   }
   else // reading from stdin; TODO: check that it works
   {
-    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, start_position_mot,
 		      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 */
-      byte buff[IO_SIZE];
-      my_off_t length,tmp;
-      for (length= start_position_mot ; length > 0 ; length-=tmp)
-      {
-	tmp=min(length,sizeof(buff));
-	if (my_b_read(file, buff, (uint) tmp))
-        {
-          error= 1;
-          goto end;
-        }
-      }
-    }
-    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