List:Internals« Previous MessageNext Message »
From:sasha Date:October 17 2001 8:04pm
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-10-17 14:04:27-06:00, sasha@stripped
  fixed sleep bug on reconnect in replication
  fixed 64-bit portability bug in replication
  added BINLOG and EVENTS to non-reserved list
  added tests for the above issues

  BitKeeper/etc/ignore
    1.99 01/10/17 14:04:26 sasha@stripped +0 -1
    do not ignore my_global.h

  mysql-test/mysql-test-run.sh
    1.115 01/10/17 14:04:26 sasha@stripped +1 -1
    increase master-retry-count on slave

  mysql-test/r/keywords.result
    1.5 01/10/17 14:04:26 sasha@stripped +6 -0
    test handling of events and binlog as non-reserved keywords

  mysql-test/r/rpl000014.result
    1.12 01/10/17 14:04:26 sasha@stripped +7 -7
    fixed wrong offsets

  mysql-test/r/rpl000018.result
    1.5 01/10/17 14:04:26 sasha@stripped +10 -0
    test result update

  mysql-test/t/keywords.test
    1.4 01/10/17 14:04:26 sasha@stripped +4 -0
    test handling of new non-reserved keywords

  mysql-test/t/rpl000014.test
    1.14 01/10/17 14:04:26 sasha@stripped +4 -7
    fixed wrong offsets
    cleanup

  mysql-test/t/rpl000018.test
    1.6 01/10/17 14:04:26 sasha@stripped +30 -0
    test master restart

  sql/slave.cc
    1.133 01/10/17 14:04:26 sasha@stripped +3 -3
    fixed sleep bug on reconnect
    fixed 64-bit portability problem

  sql/sql_yacc.yy
    1.118 01/10/17 14:04:26 sasha@stripped +2 -0
    BINLOG and EVENTS are now non-reserved, can be in table/column identifiers

# 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.114/mysql-test/mysql-test-run.sh	Sat Oct 13 09:29:32 2001
+++ 1.115/mysql-test/mysql-test-run.sh	Wed Oct 17 14:04:26 2001
@@ -750,7 +750,7 @@
 	    --slave-load-tmpdir=$SLAVE_LOAD_TMPDIR \
 	    --report-host=127.0.0.1 --report-user=root \
 	    --report-port=$slave_port \
-	    --master-retry-count=5 \
+	    --master-retry-count=10 \
 	     $SMALL_SERVER \
              $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
     CUR_MYERR=$slave_err

--- 1.132/sql/slave.cc	Sat Oct 13 09:28:34 2001
+++ 1.133/sql/slave.cc	Wed Oct 17 14:04:26 2001
@@ -868,7 +868,7 @@
 }
 
 
-static uint read_event(MYSQL* mysql, MASTER_INFO *mi)
+static ulong read_event(MYSQL* mysql, MASTER_INFO *mi)
 {
   ulong len = packet_error;
   // for convinience lets think we start by
@@ -1117,7 +1117,7 @@
       while(!slave_killed(thd))
 	{
 	  thd->proc_info = "Reading master update";
-	  uint event_len = read_event(mysql, &glob_mi);
+	  ulong event_len = read_event(mysql, &glob_mi);
 	  if(slave_killed(thd))
 	    {
 	      sql_print_error("Slave thread killed while reading event");
@@ -1299,8 +1299,8 @@
 %s, last_errno=%d, retry in %d sec",
 		      mc_mysql_error(mysql), last_errno=mc_mysql_errno(mysql),
 		      mi->connect_retry);
-      safe_sleep(thd, mi->connect_retry);
     }
+    safe_sleep(thd, mi->connect_retry);
     /* by default we try forever. The reason is that failure will trigger
        master election, so if the user did not set master_retry_count we
        do not want to have electioin triggered on the first failure to

--- 1.117/sql/sql_yacc.yy	Wed Oct 10 10:22:13 2001
+++ 1.118/sql/sql_yacc.yy	Wed Oct 17 14:04:26 2001
@@ -2831,6 +2831,7 @@
 	| BACKUP_SYM		{}
 	| BEGIN_SYM		{}
 	| BERKELEY_DB_SYM	{}
+	| BINLOG_SYM		{}
 	| BIT_SYM		{}
 	| BOOL_SYM		{}
 	| BOOLEAN_SYM		{}
@@ -2857,6 +2858,7 @@
 	| END			{}
 	| ENUM			{}
 	| ESCAPE_SYM		{}
+	| EVENTS_SYM		{}
 	| EXTENDED_SYM		{}
 	| FAST_SYM		{}
 	| FULL			{}

--- 1.4/mysql-test/r/keywords.result	Wed Oct 10 18:59:44 2001
+++ 1.5/mysql-test/r/keywords.result	Wed Oct 17 14:04:26 2001
@@ -8,3 +8,9 @@
 t1.time+0	t1.date+0	t1.timestamp+0	concat(date," ",time)
 122222	19970203	19970102000000	1997-02-03 12:22:22
 drop table t1;
+create table events(binlog int);
+insert into events values(1);
+select events.binlog from events;
+binlog
+1
+drop table events;

--- 1.3/mysql-test/t/keywords.test	Wed Oct 10 18:59:42 2001
+++ 1.4/mysql-test/t/keywords.test	Wed Oct 17 14:04:26 2001
@@ -8,3 +8,7 @@
 select * from t1;
 select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time) from t1;
 drop table t1;
+create table events(binlog int);
+insert into events values(1);
+select events.binlog from events;
+drop table events;

--- 1.98/BitKeeper/etc/ignore	Fri Oct 12 09:46:37 2001
+++ 1.99/BitKeeper/etc/ignore	Wed Oct 17 14:04:26 2001
@@ -180,7 +180,6 @@
 heap/hp_test1
 heap/hp_test2
 include/my_config.h
-include/my_global.h
 include/mysql_version.h
 include/widec.h
 innobase/conftest.s1

--- 1.11/mysql-test/r/rpl000014.result	Wed Oct 10 18:59:44 2001
+++ 1.12/mysql-test/r/rpl000014.result	Wed Oct 17 14:04:26 2001
@@ -8,21 +8,21 @@
 master-bin.001	79		
 show slave status;
 Master_Host	Master_User	Master_Port	Connect_retry	Log_File	Pos	Slave_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Last_log_seq
-127.0.0.1	root	9999	1	master-bin.001	79	Yes			0		0	1
-change master to master_log_pos=73;
+127.0.0.1	root	$MASTER_MYPORT	1	master-bin.001	79	Yes			0		0	1
+change master to master_log_pos=79;
 slave stop;
-change master to master_log_pos=73;
+change master to master_log_pos=79;
 show slave status;
 Master_Host	Master_User	Master_Port	Connect_retry	Log_File	Pos	Slave_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Last_log_seq
-127.0.0.1	root	9999	1	master-bin.001	73	No			0		0	1
+127.0.0.1	root	$MASTER_MYPORT	1	master-bin.001	79	No			0		0	1
 slave start;
 show slave status;
 Master_Host	Master_User	Master_Port	Connect_retry	Log_File	Pos	Slave_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Last_log_seq
-127.0.0.1	root	9999	1	master-bin.001	73	Yes			0		0	1
-change master to master_log_pos=173;
+127.0.0.1	root	$MASTER_MYPORT	1	master-bin.001	79	Yes			0		0	1
+change master to master_log_pos=151;
 show slave status;
 Master_Host	Master_User	Master_Port	Connect_retry	Log_File	Pos	Slave_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter	Last_log_seq
-127.0.0.1	root	9999	1	master-bin.001	173	Yes			0		0	1
+127.0.0.1	root	$MASTER_MYPORT	1	master-bin.001	151	Yes			0		0	1
 show master status;
 File	Position	Binlog_do_db	Binlog_ignore_db
 master-bin.001	79		

--- 1.4/mysql-test/r/rpl000018.result	Wed Oct 10 18:59:44 2001
+++ 1.5/mysql-test/r/rpl000018.result	Wed Oct 17 14:04:26 2001
@@ -11,3 +11,13 @@
 n
 3351
 drop table t1;
+create table t1(n int);
+insert into t1 values(345);
+lock tables t1 write;
+update t1 set n=n+3;
+update t1 set n=n+5;
+unlock tables;
+select * from t1;
+n
+353
+drop table t1;

--- 1.13/mysql-test/t/rpl000014.test	Wed Oct 10 18:59:42 2001
+++ 1.14/mysql-test/t/rpl000014.test	Wed Oct 17 14:04:26 2001
@@ -1,21 +1,18 @@
+eval_result;
 source include/master-slave.inc;
 connection master;
 show master status;
 save_master_pos;
 connection slave;
 sync_with_master;
---replace_result 9306 9999 3334 9999 3335 9999
 show slave status;
-change master to master_log_pos=73;
+change master to master_log_pos=79;
 slave stop;
-change master to master_log_pos=73;
---replace_result 9306 9999 3334 9999 3335 9999
+change master to master_log_pos=79;
 show slave status;
 slave start;
---replace_result 9306 9999 3334 9999 3335 9999
 show slave status;
-change master to master_log_pos=173;
---replace_result 9306 9999 3334 9999 3335 9999
+change master to master_log_pos=151;
 show slave status;
 connection master;
 show master status;

--- 1.5/mysql-test/t/rpl000018.test	Thu Oct 11 13:55:28 2001
+++ 1.6/mysql-test/t/rpl000018.test	Wed Oct 17 14:04:26 2001
@@ -1,6 +1,7 @@
 require_manager;
 connect (master,localhost,root,,test,0,master.sock);
 connect (slave,localhost,root,,test,0,slave.sock);
+connect (slave1,localhost,root,,test,0,slave.sock);
 server_stop master;
 server_start master;
 connection slave;
@@ -16,6 +17,35 @@
 sync_with_master;
 select * from t1;
 connection master;
+drop table t1;
+save_master_pos;
+connection slave;
+sync_with_master;
+
+#test slave's ability to recover from a temporary master outage
+connection master;
+create table t1(n int);
+insert into t1 values(345);
+save_master_pos;
+connection slave1;
+sync_with_master;
+lock tables t1 write;
+connection master;
+update t1 set n=n+3;
+update t1 set n=n+5;
+save_master_pos;
+server_stop master;
+sleep 5;
+server_start master;
+# some systems have a problem with re-connect because a
+# server going down will not abort I/O on the client,
+# so we use this hack for now
+connect (master1,localhost,root,,test,0,master.sock);
+connection slave1;
+unlock tables;
+sync_with_master;
+select * from t1;
+connection master1;
 drop table t1;
 save_master_pos;
 connection slave;
Thread
bk commit into 4.0 treesasha17 Oct