List:Commits« Previous MessageNext Message »
From:Frazer Clement Date:January 11 2012 12:38pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (frazer.clement:4780 to 4781)
View as plain text  
 4781 Frazer Clement	2012-01-11
      Test case and compiler warning fixes

    modified:
      mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch.test
      mysql-test/suite/ndb_rpl/t/ndb_rpl_rep_error.test
      sql/ha_ndbcluster_binlog.cc
 4780 Frazer Clement	2012-01-11
      Refactor ndb_apply_status write_row generation
      
      Existing code splits row buffer initialisation from setting 
      and writing.  Looks like an optimisation that's been broken.
      
      This patch pulls out the buffer preparation and writing into
      a method, and calls it from one place, chipping some code and 
      locals off the Binlog Injector monolith.

    modified:
      sql/ha_ndbcluster_binlog.cc
=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch.test	2012-01-11 11:07:09 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch.test	2012-01-11 12:37:11 +0000
@@ -232,6 +232,7 @@ insert into mysql.ndb_replication values
   ("test", "t4", 0, 7, "NDB\$EPOCH(-1)");
 
 --disable_query_log
+# Only need suppress here, as table creation fails due to this.
 call mtr.add_suppression("NDB Slave: .* Too many extra Gci bits at .*");
 --enable_query_log
 

=== modified file 'mysql-test/suite/ndb_rpl/t/ndb_rpl_rep_error.test'
--- a/mysql-test/suite/ndb_rpl/t/ndb_rpl_rep_error.test	2012-01-11 11:07:09 +0000
+++ b/mysql-test/suite/ndb_rpl/t/ndb_rpl_rep_error.test	2012-01-11 12:37:11 +0000
@@ -2,7 +2,7 @@
 # Some negative tests of the ndb_replication table
 #
 #
---source include/have_ndb.inc
+--source include/have_multi_ndb.inc
 --source include/have_binlog_format_mixed_or_row.inc
 --source suite/ndb_rpl/ndb_master-slave.inc
 
@@ -46,12 +46,25 @@ CREATE TABLE mysql.ndb_replication
 --enable_warnings
 --enable_query_log
 
-# Non existant conflict_fn
-# gives error when creating table
+# Need suppressions on all servers where warnings/errors can be seen.
 --disable_query_log
+--connection server1
+call mtr.add_suppression("NDB Slave: .* unknown conflict resolution function .*");
+call mtr.add_suppression("NDB Slave: .* has wrong datatype.*");
+call mtr.add_suppression("NDB Slave: .* missing function argument .*");
+call mtr.add_suppression("NDB Slave: .* missing \')\' .*");
+--connection server2
 call mtr.add_suppression("NDB Slave: .* unknown conflict resolution function .*");
+call mtr.add_suppression("NDB Slave: .* has wrong datatype.*");
+call mtr.add_suppression("NDB Slave: .* missing function argument .*");
+call mtr.add_suppression("NDB Slave: .* missing \')\' .*");
+--connection default
 --enable_query_log
 
+# Non existant conflict_fn
+# gives error when creating table
+#call mtr.add_suppression("NDB Slave: .* unknown conflict resolution function .*");
+
 insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$X(X)");
 --error 1005
 create table t1 (a int key, X int) engine ndb;
@@ -60,9 +73,7 @@ delete from mysql.ndb_replication;
 
 # Column type cannot be used for this function
 # gives warning when creating table
---disable_query_log
-call mtr.add_suppression("NDB Slave: .* has wrong datatype.*");
---enable_query_log
+#call mtr.add_suppression("NDB Slave: .* has wrong datatype.*");
 
 insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$MAX(X)");
 create table t1 (a int key, X int) engine ndb;
@@ -71,9 +82,7 @@ delete from mysql.ndb_replication;
 
 # Too few arguments
 # gives error when creating table
---disable_query_log
-call mtr.add_suppression("NDB Slave: .* missing function argument .*");
---enable_query_log
+#call mtr.add_suppression("NDB Slave: .* missing function argument .*");
 
 insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$MAX()");
 --error 1005
@@ -83,9 +92,7 @@ delete from mysql.ndb_replication;
 
 # Too many arguments
 # gives error when creating table
---disable_query_log
-call mtr.add_suppression("NDB Slave: .* missing \')\' .*");
---enable_query_log
+#call mtr.add_suppression("NDB Slave: .* missing \')\' .*");
 insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$MAX(X Y)");
 --error 1005
 create table t1 (a int key, X int) engine ndb;

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2012-01-11 11:49:05 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2012-01-11 12:37:11 +0000
@@ -4522,7 +4522,7 @@ setup_conflict_fn(THD *thd, NDB_SHARE *s
     /* Now try to find the column in the table */
     int colNum = -1;
     const char* resolveColName = args[0].resolveColNameBuff;
-    int resolveColNameLen = strlen(resolveColName);
+    int resolveColNameLen = (int)strlen(resolveColName);
 
     for (int j=0; j< ndbtab->getNoOfColumns(); j++)
     {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (frazer.clement:4780 to 4781) Frazer Clement11 Jan