List:Commits« Previous MessageNext Message »
From:tomas Date:April 12 2006 1:55pm
Subject:bk commit into 5.1 tree (tomas:1.2312)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2312 06/04/12 15:55:41 tomas@stripped +11 -0
  increase save_master_pos timeout to 30 seconds for higher test predictability
      better replicaiton test cleanup to ensure better test predictability
  + some ndb test cleanup

  mysql-test/t/rpl_ndb_sync.test
    1.8 06/04/12 15:55:32 tomas@stripped +15 -47
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/t/rpl_ndb_dd_basic.test
    1.5 06/04/12 15:55:32 tomas@stripped +1 -1
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/t/rpl_ndb_dd_advance.test
    1.5 06/04/12 15:55:32 tomas@stripped +2 -22
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/t/rpl_ndb_basic.test
    1.4 06/04/12 15:55:32 tomas@stripped +1 -1
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/t/rpl_ndb_bank.test
    1.6 06/04/12 15:55:32 tomas@stripped +1 -28
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/t/disabled.def
    1.125 06/04/12 15:55:32 tomas@stripped +4 -4
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/r/rpl_ndb_sync.result
    1.7 06/04/12 15:55:32 tomas@stripped +5 -5
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/r/rpl_ndb_dd_advance.result
    1.4 06/04/12 15:55:32 tomas@stripped +0 -3
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/extra/rpl_tests/rpl_row_UUID.test
    1.4 06/04/12 15:55:32 tomas@stripped +1 -0
    better replicaiton test cleanup to ensure better test predictability

  mysql-test/extra/rpl_tests/rpl_ddl.test
    1.9 06/04/12 15:55:32 tomas@stripped +1 -0
    better replicaiton test cleanup to ensure better test predictability

  client/mysqltest.c
    1.204 06/04/12 15:55:31 tomas@stripped +18 -12
    increase save_master_pos timeout to 30 seconds for higher test predictability

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new

--- 1.3/mysql-test/r/rpl_ndb_dd_advance.result	2006-03-13 09:02:44 +01:00
+++ 1.4/mysql-test/r/rpl_ndb_dd_advance.result	2006-04-12 15:55:32 +02:00
@@ -370,13 +370,10 @@
 10000
 ***** Add some more records to master *********
 ***** Finsh the slave sync process *******
-* 1. *
 @the_epoch:=MAX(epoch)
 <the_epoch>
-* 2. *
 @the_pos:=Position	@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
 <the_pos>	master-bin.000001
-* 3. *
 * 4. *
 * 5. *
 START SLAVE;

--- 1.4/mysql-test/t/rpl_ndb_dd_advance.test	2006-03-13 09:02:05 +01:00
+++ 1.5/mysql-test/t/rpl_ndb_dd_advance.test	2006-04-12 15:55:32 +02:00
@@ -479,29 +479,9 @@
 # 5. start the replication
 
 --echo ***** Finsh the slave sync process *******
-# 1.
---echo * 1. *
-connection slave;
 --disable_query_log
---replace_column 1 <the_epoch>
-SELECT @the_epoch:=MAX(epoch) FROM cluster.apply_status;
---let $the_epoch= `select @the_epoch`
-
-# 2.
---echo * 2. *
-connection master;
---replace_column 1 <the_pos>
-eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
-   FROM cluster.binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
---let $the_pos= `SELECT @the_pos`
---let $the_file= `SELECT @the_file`
-
-# 3.
---echo * 3. *
-connection slave;
-eval CHANGE MASTER TO
-  master_log_file = '$the_file',
-  master_log_pos = $the_pos;
+# 1. 2. 3.
+--source include/ndb_setup_slave.inc
 --enable_query_log
 
 # 4.

--- 1.124/mysql-test/t/disabled.def	2006-04-11 10:15:02 +02:00
+++ 1.125/mysql-test/t/disabled.def	2006-04-12 15:55:32 +02:00
@@ -17,15 +17,15 @@
 #ndb_cache2              : Bug #18597 simultaneous drop table and ndb statistics update triggers node failure
 #ndb_gis                 : Bug #18600 ndb_gis test failure
 #ndb_load                : Bug#17233 failed load data from infile causes mysqld dbug_assert, binlog not flushed
-#partition_03ndb         : Bug#16385 Partitions: crash when updating a range partitioned NDB table
+partition_03ndb         : Bug#16385 Partitions: crash when updating a range partitioned NDB table
 ps_7ndb                 : dbug assert in RBR mode when executing test suite
-#rpl_ndb_2innodb         : assertion in get_parts_for_update()
-#rpl_ndb_2myisam         : assertion in get_parts_for_update()
+rpl_ndb_2innodb         : Bug #19004 ndb: partition by range and update hangs (note, test must also be updated to have primary key with blob table)
+rpl_ndb_2myisam         : Bug #19004 ndb: partition by range and update hangs (note, test must also be updated to have primary key with blob table)
 rpl_ndb_auto_inc        : Bug#17086 CR: auto_increment_increment and auto_increment_offset produce duplicate key er
 #rpl_ndb_basic           : Bug #18592 rpl_ndb_basic failure
 #rpl_ndb_dd_advance      : Bug #18924 rpl_ndb_dd_advance failure
 #rpl_ndb_dd_basic        : Bug #18569 rpl_ndb_dd_basic failure
-#rpl_ndb_ddl             : master hangs
+rpl_ndb_ddl             : result file needs update + test needs to checked
 #rpl_ndb_insert_ignore   : Bug #18567 rpl_ndb_insert_ignore failure
 #rpl_ndb_innodb2ndb      : Bug#18261: Cluster Replication: tests rpl_ndb_xxx2ndb fails
 #rpl_ndb_log             : result not deterministic, TBD if should remove

--- 1.3/mysql-test/extra/rpl_tests/rpl_row_UUID.test	2006-02-22 10:07:31 +01:00
+++ 1.4/mysql-test/extra/rpl_tests/rpl_row_UUID.test	2006-04-12 15:55:32 +02:00
@@ -80,3 +80,4 @@
 # be removed at next testsuite run.
 
 # End of 5.0 test case
+-- source include/master-slave-end.inc

--- 1.8/mysql-test/extra/rpl_tests/rpl_ddl.test	2005-12-22 05:10:54 +01:00
+++ 1.9/mysql-test/extra/rpl_tests/rpl_ddl.test	2006-04-12 15:55:32 +02:00
@@ -507,4 +507,5 @@
 DROP DATABASE IF EXISTS mysqltest3;
 --enable_warnings
 
+-- source include/master-slave-end.inc
 

--- 1.203/client/mysqltest.c	2006-04-06 11:36:06 +02:00
+++ 1.204/client/mysqltest.c	2006-04-12 15:55:31 +02:00
@@ -1596,9 +1596,9 @@
       It may be that the slave SQL thread has not started yet, though START
       SLAVE has been issued ?
     */
-    if (tries++ == 3)
+    if (tries++ == 30)
       die("could not sync with master ('%s' returned NULL)", query_buf);
-    sleep(1); /* So at most we will wait 3 seconds and make 4 tries */
+    sleep(1); /* So at most we will wait 30 seconds and make 31 tries */
     mysql_free_result(res);
     goto wait_for_position;
   }
@@ -1664,14 +1664,14 @@
     {
       ulonglong epoch=0, tmp_epoch= 0;
       int count= 0;
-
-      do
+      int do_continue= 1;
+      while (do_continue)
       {
         const char binlog[]= "binlog";
         const char latest_trans_epoch[]=
           "latest_trans_epoch=";
-        const char latest_applied_binlog_epoch[]=
-          "latest_applied_binlog_epoch=";
+        const char latest_handled_binlog_epoch[]=
+          "latest_handled_binlog_epoch=";
         if (count)
           sleep(1);
         if (mysql_query(mysql, query= "show engine ndb status"))
@@ -1701,26 +1701,32 @@
                     start_lineno, latest_trans_epoch, query);
             }
             /* latest_applied_binlog_epoch */
-            while (*status && strncmp(status, latest_applied_binlog_epoch,
-                                      sizeof(latest_applied_binlog_epoch)-1))
+            while (*status && strncmp(status, latest_handled_binlog_epoch,
+                                      sizeof(latest_handled_binlog_epoch)-1))
               status++;
             if (*status)
             {
-              status+= sizeof(latest_applied_binlog_epoch)-1;
+              status+= sizeof(latest_handled_binlog_epoch)-1;
               tmp_epoch= strtoull(status, (char**) 0, 10);
             }
             else
               die("line %u: result does not contain '%s' in '%s'",
-                  start_lineno, latest_applied_binlog_epoch, query);
+                  start_lineno, latest_handled_binlog_epoch, query);
             break;
           }
         }
-        mysql_free_result(res);
         if (!row)
           die("line %u: result does not contain '%s' in '%s'",
               start_lineno, binlog, query);
         count++;
-      } while (tmp_epoch < epoch && count <= 3);
+        if (tmp_epoch >= epoch)
+          do_continue= 0;
+        else if (count > 30)
+        {
+          break;
+        }
+        mysql_free_result(res);
+      }
     }
   }
 #endif

--- 1.6/mysql-test/r/rpl_ndb_sync.result	2006-03-01 13:31:13 +01:00
+++ 1.7/mysql-test/r/rpl_ndb_sync.result	2006-04-12 15:55:32 +02:00
@@ -25,13 +25,13 @@
 0	1	BCDEF
 1	0	CD
 0	0	DEFGHIJKL
-CREATE TEMPORARY TABLE IF NOT EXISTS cluster.backup_info (id INT, backup_id INT)ENGINE=HEAP;
-DELETE FROM cluster.backup_info;
-LOAD DATA INFILE '../tmp.dat' INTO TABLE cluster.backup_info FIELDS TERMINATED BY ',';
-SELECT @the_backup_id:=backup_id FROM cluster.backup_info;
+CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP;
+DELETE FROM test.backup_info;
+LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
+SELECT @the_backup_id:=backup_id FROM test.backup_info;
 @the_backup_id:=backup_id
 <the_backup_id>
-DROP TABLE cluster.backup_info;
+DROP TABLE test.backup_info;
 UPDATE t1 SET c2=0 WHERE c3="row2";
 SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 hex(c1)	hex(c2)	c3

--- 1.5/mysql-test/t/rpl_ndb_bank.test	2006-03-01 13:31:13 +01:00
+++ 1.6/mysql-test/t/rpl_ndb_bank.test	2006-04-12 15:55:32 +02:00
@@ -132,34 +132,7 @@
 
 #
 # now setup replication to continue from last epoch
-# 1. get apply_status epoch from slave
-# 2. get corresponding _next_ binlog postition from master
-# 3. change master on slave
-# 4. start the replication
-
-# 1.
---connection slave
---replace_column 1 <the_epoch>
-SELECT @the_epoch:=MAX(epoch) FROM cluster.apply_status;
---let $the_epoch= `select @the_epoch`
-
-# 2.
---connection master
---replace_result $the_epoch <the_epoch>
---replace_column 1 <the_pos>
-eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
-   FROM cluster.binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
---let $the_pos= `SELECT @the_pos`
---let $the_file= `SELECT @the_file`
-
-# 3.
---connection slave
---replace_result $the_pos <the_pos>
-eval CHANGE MASTER TO
-  master_log_file = '$the_file',
-  master_log_pos = $the_pos;
-
-# 4.
+--source include/ndb_setup_slave.inc
 --connection slave
 START SLAVE;
 

--- 1.3/mysql-test/t/rpl_ndb_basic.test	2006-03-07 13:29:48 +01:00
+++ 1.4/mysql-test/t/rpl_ndb_basic.test	2006-04-12 15:55:32 +02:00
@@ -146,4 +146,4 @@
 # cleanup
 --connection master
 DROP TABLE t1;
-sync_slave_with_master;
+-- source include/master-slave-end.inc

--- 1.4/mysql-test/t/rpl_ndb_dd_basic.test	2006-03-11 15:52:29 +01:00
+++ 1.5/mysql-test/t/rpl_ndb_dd_basic.test	2006-04-12 15:55:32 +02:00
@@ -82,4 +82,4 @@
 engine=ndb;
 DROP TABLESPACE ts1 ENGINE=NDB;
 DROP LOGFILE GROUP lg1 ENGINE=NDB;
---sync_slave_with_master
+-- source include/master-slave-end.inc

--- 1.7/mysql-test/t/rpl_ndb_sync.test	2006-03-01 13:31:13 +01:00
+++ 1.8/mysql-test/t/rpl_ndb_sync.test	2006-04-12 15:55:32 +02:00
@@ -8,13 +8,13 @@
 #
 
 # stop the save
-connection slave;
+--connection slave
 STOP SLAVE;
 CREATE DATABASE ndbsynctest;
 USE ndbsynctest;
 
 # get some data on the master
-connection master;
+--connection master
 CREATE DATABASE ndbsynctest;
 USE ndbsynctest;
 CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ;
@@ -25,21 +25,14 @@
 SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
 
 # take a backup on master
---exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
---exec $NDB_TOOLS_DIR/ndb_select_all --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat
-CREATE TEMPORARY TABLE IF NOT EXISTS cluster.backup_info (id INT, backup_id INT)ENGINE=HEAP;
-DELETE FROM cluster.backup_info;
-LOAD DATA INFILE '../tmp.dat' INTO TABLE cluster.backup_info FIELDS TERMINATED BY ',';
---replace_column 1 <the_backup_id>
-SELECT @the_backup_id:=backup_id FROM cluster.backup_info;
-let the_backup_id=`select @the_backup_id` ;
-DROP TABLE cluster.backup_info;
+--source include/ndb_backup.inc
+
 # update a row
 UPDATE t1 SET c2=0 WHERE c3="row2";
 SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 
 # restore on slave, first check that nothing is there
-connection slave
+--connection slave
 
 # we should have no tables
 SHOW TABLES;
@@ -66,40 +59,16 @@
 
 #
 # now setup replication to continue from last epoch
-# 1. get apply_status epoch from slave
-# 2. get corresponding _next_ binlog postition from master
-# 3. change master on slave
-
-# 1.
-connection slave;
---replace_column 1 <the_epoch>
-SELECT @the_epoch:=MAX(epoch) FROM cluster.apply_status;
-let $the_epoch= `select @the_epoch` ;
-
-# 2.
-connection master;
---replace_result $the_epoch <the_epoch>
---replace_column 1 <the_pos>
-eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
-   FROM cluster.binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
-let $the_pos= `SELECT @the_pos` ;
-let $the_file= `SELECT @the_file` ;
-
-# 3.
-connection slave;
---replace_result $the_pos <the_pos>
-eval CHANGE MASTER TO
-  master_log_file = '$the_file',
-  master_log_pos = $the_pos ;
+--source include/ndb_setup_slave.inc
+--connection slave
 START SLAVE;
 
 #
 #
 #
-connection master;
-#sync_slave_with_master;
---sleep 2
-connection slave;
+--connection master
+--sync_slave_with_master
+--connection slave
 --replace_result $MASTER_MYPORT MASTER_PORT
 --replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master>
 SHOW SLAVE STATUS;
@@ -111,22 +80,21 @@
 # Cleanup
 #
 
-connection master;
+--connection master
 DROP DATABASE ndbsynctest;
-#sync_slave_with_master;
---sleep 2
-connection slave;
+--sync_slave_with_master
+--connection slave
 STOP SLAVE;
 
 #
 # Test some replication commands
 #
-connection master;
+--connection master
 reset master;
 # should now contain nothing
 select * from cluster.binlog_index;
 
-connection slave;
+--connection slave
 reset slave;
 # should now contain nothing
 select * from cluster.apply_status;
Thread
bk commit into 5.1 tree (tomas:1.2312)tomas12 Apr