List:Internals« Previous MessageNext Message »
From:sasha Date:November 9 2001 5:27am
Subject:bk commit into 4.0 tree
View as plain text  
Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated 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@stripped, 2001-11-08 22:27:55-07:00, sasha@stripped
  fixed memory leak in replication
  fixed bugs in new IO_CACHE code so that the old calls work
  fixed shutdown bug
  clean-up of mysql-test-run

  sql/mysqld.cc
    1.243 01/11/08 22:27:55 sasha@stripped +2 -0
    fixed shutdown bug when singals DO break read introduced by the fix for 
    when they don't.

  sql/repl_failsafe.cc
    1.5 01/11/08 22:27:55 sasha@stripped +1 -0
    fixed memory leak

  include/my_sys.h
    1.59 01/11/08 22:27:54 sasha@stripped +11 -6
    fixes for IO_CACHE

  mysql-test/mysql-test-run.sh
    1.121 01/11/08 22:27:54 sasha@stripped +12 -6
    fixed missing \ bug
    added --skip-gdb-magic to skip Sergei's automatic mysql_parse break
    do not delete the breakpoint in command - it crashes gdb sometimes

  mysys/mf_iocache2.c
    1.9 01/11/08 22:27:54 sasha@stripped +4 -4
    rc_pos->write_pos in my_b_seek for WRITE_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:	sasha
# Host:	mysql.sashanet.com
# Root:	/home/sasha/src/bk/mysql-4.0

--- 1.58/include/my_sys.h	Wed Nov  7 16:17:38 2001
+++ 1.59/include/my_sys.h	Thu Nov  8 22:27:54 2001
@@ -359,7 +359,6 @@
   (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
    ((info)->write_pos+=(Count)),0) : \
    (*(info)->write_function)((info),(Buffer),(Count)))
-  
  
 
 #define my_b_get(info) \
@@ -370,17 +369,23 @@
 
 	/* my_b_write_byte dosn't have any err-check */
 #define my_b_write_byte(info,chr) \
-  (((info)->rc_pos < (info)->rc_end) ?\
-   ((*(info)->rc_pos++)=(chr)) :\
-   (_my_b_write(info,0,0) , ((*(info)->rc_pos++)=(chr))))
+  (((info)->write_pos < (info)->write_end) ?\
+   ((*(info)->write_pos++)=(chr)) :\
+   (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr))))
 
 #define my_b_fill_cache(info) \
   (((info)->rc_end=(info)->rc_pos),(*(info)->read_function)(info,0,0))
 
+#define my_write_cache(info) (((info)->type == WRITE_CACHE))
+#define my_cache_pointer(info)  (my_write_cache(info) ? \
+               ((info)->write_pos) : ((info)->rc_pos))
+
 #define my_b_tell(info) ((info)->pos_in_file + \
-			 ((info)->rc_pos - (info)->rc_request_pos))
+			 my_cache_pointer(info) - (info)->rc_request_pos)
 
-#define my_b_bytes_in_cache(info) ((uint) ((info)->rc_end - (info)->rc_pos))
+#define my_b_bytes_in_cache(info) (my_write_cache(info) ? \
+ ((uint) ((info)->write_end - (info)->write_pos)): \
+ ((uint) ((info)->rc_end - (info)->rc_pos)))
 
 typedef struct st_changeable_var {
   const char *name;			/* Name of variable */

--- 1.120/mysql-test/mysql-test-run.sh	Wed Nov  7 16:53:10 2001
+++ 1.121/mysql-test/mysql-test-run.sh	Thu Nov  8 22:27:54 2001
@@ -177,6 +177,7 @@
     --skip-rpl) NO_SLAVE=1 ;;
     --skip-test=*) SKIP_TEST=`$ECHO "$1" | $SED -e "s;--skip-test=;;"`;;
     --do-test=*) DO_TEST=`$ECHO "$1" | $SED -e "s;--do-test=;;"`;;
+    --skip-gdb-magic) SKIP_GDB_MAGIC=1 ;;
     --wait-timeout=*)
      START_WAIT_TIMEOUT=`$ECHO "$1" | $SED -e "s;--wait-timeout=;;"`
      STOP_WAIT_TIMEOUT=$START_WAIT_TIMEOUT;;
@@ -654,7 +655,7 @@
             --basedir=$MY_BASEDIR --init-rpl-role=master \
 	    --port=$MASTER_MYPORT \
 	    --exit-info=256 \
-	    --core
+	    --core \
             --datadir=$MASTER_MYDDIR \
 	    --pid-file=$MASTER_MYPID \
 	    --socket=$MASTER_MYSOCK \
@@ -694,13 +695,18 @@
       "gdb -x $GDB_MASTER_INIT" $MYSQLD 
     elif [ x$DO_GDB = x1 ]
     then
-      $CAT <<__GDB_MASTER_INIT__  > $GDB_MASTER_INIT
+      ( echo set args $master_args;
+        if [ -z "$SKIP_GDB_MAGIC" ] ;
+	then
+	 cat <<EOF
 b mysql_parse
 commands 1
-dele 1
+echo If you do not want to break here anymore, type dele 1\n
+echo If you not want to break at all, use --skip-gdb-magic\n
 end
-r $master_args
-__GDB_MASTER_INIT__
+r
+EOF
+      fi )  > $GDB_MASTER_INIT     
       manager_launch master $XTERM -display $DISPLAY \
       -title "Master" -e gdb -x $GDB_MASTER_INIT $MYSQLD 
     else	    
@@ -982,7 +988,7 @@
    fi
  fi
  cd $MYSQL_TEST_DIR
-  
+   
  if [ -f $tf ] ; then
     $RM -f r/$tname.*reject
     mysql_test_args="-R r/$tname.result $EXTRA_MYSQL_TEST_OPT"

--- 1.242/sql/mysqld.cc	Wed Nov  7 16:53:10 2001
+++ 1.243/sql/mysqld.cc	Thu Nov  8 22:27:55 2001
@@ -627,7 +627,9 @@
 #endif
     DBUG_PRINT("quit",("After pthread_kill"));
     shutdown_in_progress=1;			// Safety if kill didn't work
+#ifdef SIGNALS_DONT_BREAK_READ    
     abort_loop=1;
+#endif    
     DBUG_VOID_RETURN;
 }
 

--- 1.8/mysys/mf_iocache2.c	Wed Oct  3 08:02:14 2001
+++ 1.9/mysys/mf_iocache2.c	Thu Nov  8 22:27:54 2001
@@ -38,10 +38,10 @@
   }
   else if (info->type == WRITE_CACHE)
   {
-    byte* try_rc_pos;
-    try_rc_pos = info->rc_pos + (pos - info->pos_in_file);
-    if (try_rc_pos >= info->buffer && try_rc_pos <= info->rc_end)
-      info->rc_pos = try_rc_pos;
+    byte* try_write_pos;
+    try_write_pos = info->write_pos + (pos - info->pos_in_file);
+    if (try_write_pos >= info->buffer && try_write_pos <= info->write_end)
+      info->write_pos = try_write_pos;
     else
       flush_io_cache(info);
   }

--- 1.4/sql/repl_failsafe.cc	Tue Oct 23 13:27:20 2001
+++ 1.5/sql/repl_failsafe.cc	Thu Nov  8 22:27:55 2001
@@ -138,6 +138,7 @@
 	goto err;
       }
       si->server_id = server_id;
+      hash_insert(&slave_list, (byte*)si);
     }
     strnmov(si->host, row[1], sizeof(si->host));
     si->port = atoi(row[port_ind]);
Thread
bk commit into 4.0 treesasha9 Nov