List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:January 28 2011 12:40pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4149)
View as plain text  
#At file:///home/msvensson/mysql/7.0/ based on revid:magnus.blaudd@stripped

 4149 Magnus Blåudd	2011-01-28
      ndb
       - the ndb_binlog_basic test is not deterministic when running
         with --ndb-no-log-empty-epochs=1, the @max_epoch variable
         get a value which is after most of the operations done on the table.
       - remove the use of max_epoch, the ndb_binlog_index table is not so big
        anyway since it's just been reset and iut's easy to filter out the interesting rows
        without it.

    modified:
      mysql-test/suite/ndb_binlog/r/ndb_binlog_basic.result
      mysql-test/suite/ndb_binlog/t/ndb_binlog_basic.test
=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_basic.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_basic.result	2008-02-25 13:50:20 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_basic.result	2011-01-28 12:40:55 +0000
@@ -7,9 +7,6 @@ use test;
 reset master;
 create table t1 (a int primary key) engine=ndb;
 insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
-@max_epoch:=max(epoch)-1
-#
 delete from t1;
 alter table t1 add (b int);
 Warnings:
@@ -22,14 +19,14 @@ update t2 set b=1 where a=3;
 delete from t2 where a=4;
 commit;
 drop table t2;
-select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5;
+select inserts from mysql.ndb_binlog_index where inserts > 5;
 inserts
 10
-select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5;
+select deletes from mysql.ndb_binlog_index where deletes > 5;
 deletes
 10
-select inserts,updates,deletes from 
-mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0;
+select inserts,updates,deletes from
+mysql.ndb_binlog_index where updates > 0;
 inserts	updates	deletes
 2	1	1
 flush logs;
@@ -40,12 +37,9 @@ use mysqltest;
 create table t1 (c int, d int primary key) engine=ndb;
 use test;
 insert into mysqltest.t1 values (2,1),(2,2);
-select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
-@max_epoch:=max(epoch)-1
-#
 drop table t1;
 drop database mysqltest;
 select inserts,updates,deletes from 
-mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0;
+mysql.ndb_binlog_index where inserts > 0;
 inserts	updates	deletes
 2	0	0

=== modified file 'mysql-test/suite/ndb_binlog/t/ndb_binlog_basic.test'
--- a/mysql-test/suite/ndb_binlog/t/ndb_binlog_basic.test	2008-02-25 13:50:20 +0000
+++ b/mysql-test/suite/ndb_binlog/t/ndb_binlog_basic.test	2011-01-28 12:40:55 +0000
@@ -18,9 +18,6 @@ reset master;
 
 create table t1 (a int primary key) engine=ndb;
 insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
-save_master_pos;
---replace_column 1 #
-select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
 
 delete from t1;
 alter table t1 add (b int);
@@ -35,14 +32,14 @@ delete from t2 where a=4;
 commit;
 drop table t2;
 
-# check that above is ok
-# (save_master_pos waits for last gcp to complete, ensuring that we have
-#  the expected data in the binlog)
+# check contents of ndb_binlog_index table
+#  - use save_master_pos to wait for a  new epoch, ensuring that we have
+#    the expected data in the binlog and ndb_binlog_index table
 save_master_pos;
-select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5;
-select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5;
-select inserts,updates,deletes from 
-  mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0;
+select inserts from mysql.ndb_binlog_index where inserts > 5;
+select deletes from mysql.ndb_binlog_index where deletes > 5;
+select inserts,updates,deletes from
+  mysql.ndb_binlog_index where updates > 0;
 
 #
 # check that purge clears the ndb_binlog_index
@@ -71,11 +68,13 @@ create table t1 (c int, d int primary ke
 use test;
 
 insert into mysqltest.t1 values (2,1),(2,2);
-save_master_pos;
---replace_column 1 #
-select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
 
 drop table t1;
 drop database mysqltest;
+
+# check contents of ndb_binlog_index table
+#  - use save_master_pos to wait for a  new epoch, ensuring that we have
+#    the expected data in the binlog and ndb_binlog_index table
+save_master_pos;
 select inserts,updates,deletes from 
-  mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0;
+  mysql.ndb_binlog_index where inserts > 0;

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110128124055-hhsxdr6qj239lhz4.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4149) Magnus Blåudd28 Jan