List:Commits« Previous MessageNext Message »
From:tomas Date:July 8 2006 1:26am
Subject:bk commit into 5.1 tree (tomas:1.2243) BUG#20902
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.2243 06/07/08 03:26:13 tomas@stripped +6 -0
  Bug #20843 tests fails randomly with assertion in completeClusterFailed
  Bug #20902 Alter table invalid schema version with statement-based binlogging
  (latter caused by the above)

  sql/ha_ndbcluster_binlog.cc
    1.76 06/07/08 03:25:55 tomas@stripped +20 -13
    Bug #20843 tests fails randomly with assertion in completeClusterFailed
    Bug #20902 Alter table invalid schema version with statement-based binlogging
    (latter caused by the above)

  sql/ha_ndbcluster.cc
    1.340 06/07/08 03:25:55 tomas@stripped +2 -2
    Bug #20843 tests fails randomly with assertion in completeClusterFailed
    Bug #20902 Alter table invalid schema version with statement-based binlogging
    (latter caused by the above)

  mysql-test/t/ndb_multi.test
    1.12 06/07/08 03:25:55 tomas@stripped +0 -4
    Bug #20843 tests fails randomly with assertion in completeClusterFailed
    Bug #20902 Alter table invalid schema version with statement-based binlogging
    (latter caused by the above)

  mysql-test/t/ndb_dd_advance.test
    1.3 06/07/08 03:25:55 tomas@stripped +0 -3
    Bug #20843 tests fails randomly with assertion in completeClusterFailed
    Bug #20902 Alter table invalid schema version with statement-based binlogging
    (latter caused by the above)

  mysql-test/t/ndb_autodiscover3.test
    1.6 06/07/08 03:25:55 tomas@stripped +0 -4
    Bug #20843 tests fails randomly with assertion in completeClusterFailed
    Bug #20902 Alter table invalid schema version with statement-based binlogging
    (latter caused by the above)

  mysql-test/t/ndb_alter_table3.test
    1.10 06/07/08 03:25:55 tomas@stripped +0 -3
    Bug #20843 tests fails randomly with assertion in completeClusterFailed
    Bug #20902 Alter table invalid schema version with statement-based binlogging
    (latter caused by the above)

# 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-ndb

--- 1.339/sql/ha_ndbcluster.cc	2006-07-05 01:56:28 +02:00
+++ 1.340/sql/ha_ndbcluster.cc	2006-07-08 03:25:55 +02:00
@@ -4781,7 +4781,7 @@
         expect it to be there.
       */
       if (!ndbcluster_create_event(ndb, m_table, event_name.c_ptr(), share,
-                                   share && do_event_op /* push warning */))
+                                   share && do_event_op ? 2 : 1/* push warning */))
       {
         if (ndb_extra_logging)
           sql_print_information("NDB Binlog: CREATE TABLE Event: %s",
@@ -5175,7 +5175,7 @@
     const NDBTAB *ndbtab= ndbtab_g2.get_table();
 
     if (!ndbcluster_create_event(ndb, ndbtab, event_name.c_ptr(), share,
-                                 share && ndb_binlog_running /* push warning */))
+                                 share && ndb_binlog_running ? 2 : 1/* push warning */))
     {
       if (ndb_extra_logging)
         sql_print_information("NDB Binlog: RENAME Event: %s",

--- 1.11/mysql-test/t/ndb_multi.test	2006-07-07 17:20:47 +02:00
+++ 1.12/mysql-test/t/ndb_multi.test	2006-07-08 03:25:55 +02:00
@@ -3,10 +3,6 @@
 -- source include/not_embedded.inc
 -- source include/have_binlog_format_statement.inc
 
-# BUG#20902: Test fails in statement-based binlogging mode. Remove when fixed.
--- source include/have_binlog_format_row.inc
-
-
 --disable_warnings
 connection server2;
 drop table if exists t1, t2, t3, t4;

--- 1.2/mysql-test/t/ndb_dd_advance.test	2006-07-07 17:20:47 +02:00
+++ 1.3/mysql-test/t/ndb_dd_advance.test	2006-07-08 03:25:55 +02:00
@@ -28,9 +28,6 @@
 -- source include/have_ndb.inc
 -- source include/not_embedded.inc
 
-# BUG#20902: Test fails in statement-based binlogging mode. Remove when fixed.
--- source include/have_binlog_format_row.inc
-
 --disable_warnings
 DROP TABLE IF EXISTS test.t1;
 DROP TABLE IF EXISTS test.t2;

--- 1.9/mysql-test/t/ndb_alter_table3.test	2006-07-07 17:20:47 +02:00
+++ 1.10/mysql-test/t/ndb_alter_table3.test	2006-07-08 03:25:55 +02:00
@@ -2,9 +2,6 @@
 -- source include/have_multi_ndb.inc
 -- source include/not_embedded.inc
 
-# BUG#20902: Test fails in statement-based binlogging mode. Remove when fixed.
--- source include/have_binlog_format_row.inc
-
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings

--- 1.5/mysql-test/t/ndb_autodiscover3.test	2006-07-07 17:20:47 +02:00
+++ 1.6/mysql-test/t/ndb_autodiscover3.test	2006-07-08 03:25:55 +02:00
@@ -2,10 +2,6 @@
 -- source include/have_multi_ndb.inc
 -- source include/not_embedded.inc
 
-# BUG#20902: Test fails in statement-based binlogging mode. Remove when fixed.
--- source include/have_binlog_format_row.inc
-
-
 --disable_warnings
 drop table if exists t1, t2;
 --enable_warnings

--- 1.75/sql/ha_ndbcluster_binlog.cc	2006-07-05 18:36:10 +02:00
+++ 1.76/sql/ha_ndbcluster_binlog.cc	2006-07-08 03:25:55 +02:00
@@ -1220,7 +1220,7 @@
     type_str= "create table";
     break;
   case SOT_ALTER_TABLE:
-    type_str= "create table";
+    type_str= "alter table";
     break;
   case SOT_DROP_DB:
     type_str= "drop db";
@@ -2500,7 +2500,7 @@
       /*
         failed, print a warning
       */
-      if (push_warning)
+      if (push_warning > 1)
         push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                             dict->getNdbError().code,
@@ -2528,7 +2528,7 @@
     if (dict->getNdbError().code == NDB_INVALID_SCHEMA_OBJECT &&
         dict->dropEvent(my_event.getName()))
     {
-      if (push_warning)
+      if (push_warning > 1)
         push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                             dict->getNdbError().code,
@@ -2547,7 +2547,7 @@
     */
     if (dict->createEvent(my_event))
     {
-      if (push_warning)
+      if (push_warning > 1)
         push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                             dict->getNdbError().code,
@@ -3442,24 +3442,31 @@
     // wait for the first event
     thd->proc_info= "Waiting for first event from ndbcluster";
     DBUG_PRINT("info", ("Waiting for the first event"));
-    int schema_res= 0, res= 0;
-    Uint64 schema_gci= 0, gci= 0;
-    while (schema_res == 0 && !abort_loop)
+    int schema_res, res;
+    Uint64 schema_gci;
+    do
     {
+      if (abort_loop)
+        goto err;
       schema_res= s_ndb->pollEvents(100, &schema_gci);
-    }
-    // now check that we have epochs consistant with what we had before the restart
-    DBUG_PRINT("info", ("schema_res: %d  schema_gci: %d", schema_res, schema_gci));
-    if (schema_res > 0)
+    } while (ndb_latest_received_binlog_epoch == schema_gci);
+    if (ndb_binlog_running)
     {
-      while (res >= 0 && gci < schema_gci && !abort_loop)
+      Uint64 gci= i_ndb->getLatestGCI();
+      while (gci < schema_gci || gci == ndb_latest_received_binlog_epoch)
       {
-        res= i_ndb->pollEvents(100, &gci);
+        if (abort_loop)
+          goto err;
+        res= i_ndb->pollEvents(10, &gci);
       }
       if (gci > schema_gci)
       {
         schema_gci= gci;
       }
+    }
+    // now check that we have epochs consistant with what we had before the restart
+    DBUG_PRINT("info", ("schema_res: %d  schema_gci: %d", schema_res, schema_gci));
+    {
       i_ndb->flushIncompleteEvents(schema_gci);
       s_ndb->flushIncompleteEvents(schema_gci);
       if (schema_gci < ndb_latest_handled_binlog_epoch)
Thread
bk commit into 5.1 tree (tomas:1.2243) BUG#20902tomas8 Jul