Commit 4b277da5 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new


client/mysqltest.c:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
mysql-test/t/disabled.def:
  manual merge
parents dfaea5c8 ce464a3d
Loading
Loading
Loading
Loading
+18 −12
Original line number Diff line number Diff line
@@ -1596,9 +1596,9 @@ int do_sync_with_master2(long offset)
      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 @@ int do_save_master_pos()
    {
      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 @@ int do_save_master_pos()
                    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 −0
Original line number Diff line number Diff line
@@ -507,4 +507,5 @@ DROP DATABASE IF EXISTS mysqltest2;
DROP DATABASE IF EXISTS mysqltest3;
--enable_warnings

-- source include/master-slave-end.inc
+4 −1
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ SHOW CREATE TABLE t1;
# Okay lets see how it holds up to table changes
--echo --- Check that simple Alter statements are replicated correctly --

ALTER TABLE t1 MODIFY vc TEXT;
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
ALTER TABLE t1 MODIFY vc TEXT;

--echo --- Show the new improved table on the master ---

@@ -117,6 +117,7 @@ SHOW CREATE TABLE t1;

--echo --- Check that simple Alter statements are replicated correctly ---

ALTER TABLE t1 ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;

--echo --- Show the new improved table on the master ---
@@ -183,6 +184,7 @@ SHOW CREATE TABLE t1;

--echo --- Check that simple Alter statements are replicated correctly ---

ALTER TABLE t1 ADD PRIMARY KEY(id);
ALTER TABLE t1 MODIFY vc TEXT;

--echo --- Show the new improved table on the master ---
@@ -239,6 +241,7 @@ SHOW CREATE TABLE t1;

--echo --- Check that simple Alter statements are replicated correctly ---

ALTER TABLE t1 ADD PRIMARY KEY(t,id);
ALTER TABLE t1 MODIFY vc TEXT;

--echo --- Show the new improved table on the master ---
+1 −0
Original line number Diff line number Diff line
@@ -80,3 +80,4 @@ DROP TABLE test.t2;
# be removed at next testsuite run.

# End of 5.0 test case
-- source include/master-slave-end.inc
+6 −0
Original line number Diff line number Diff line
@@ -183,3 +183,9 @@ connection master;

DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
# ensure cleanup on slave as well:
# ndb blob tables consist of several tables
# if cluster is shutdown while not all tables are
# properly dropped, the table becomes inconsistent
# and wrecks later test cases
--sync_slave_with_master
Loading