Commit ab6a596c 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

parents 9d1f1c32 78907f34
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ dist-hook:
		$(distdir)/r \
		$(distdir)/include \
		$(distdir)/std_data \
		$(distdir)/std_data/ndb_backup50 \
		$(distdir)/std_data/ndb_backup51 \
		$(distdir)/lib
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
	$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
@@ -63,6 +65,8 @@ dist-hook:
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(distdir)/std_data/ndb_backup50
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51
	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib

@@ -74,6 +78,8 @@ install-data-local:
		$(DESTDIR)$(testdir)/r \
		$(DESTDIR)$(testdir)/include \
		$(DESTDIR)$(testdir)/std_data \
		$(DESTDIR)$(testdir)/std_data/ndb_backup50 \
		$(DESTDIR)$(testdir)/std_data/ndb_backup51 \
		$(DESTDIR)$(testdir)/lib
	$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
	-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t
@@ -98,6 +104,8 @@ install-data-local:
	$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50
	$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51
	$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
	$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib

+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ INSERT INTO t1 VALUES(412,1,'Testing MySQL databases is a cool ',
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;

sync_slave_with_master;
--sleep 5
--echo --- Select from t1 on slave ---
select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;

@@ -41,9 +42,9 @@ SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;

# Must give injector thread a little time to get update
# into the binlog other wise we will miss the update.
sleep 10;

sync_slave_with_master;
--sleep 5
--echo --- Check Update on slave ---
SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;

@@ -55,6 +56,7 @@ DELETE FROM t1 WHERE id = 42;
SELECT COUNT(*) FROM t1;

sync_slave_with_master;
--sleep 5
--echo --- Show current count on slave for t1 --- 
SELECT COUNT(*) FROM t1;

+24 −5
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ our $opt_with_ndbcluster_slave;
our $opt_with_ndbcluster_all= 0;
our $opt_with_ndbcluster_only= 0;
our $opt_ndb_extra_test= 0;
our $opt_skip_master_binlog= 0;
our $opt_skip_slave_binlog= 0;

our $exe_ndb_mgm;
our $path_ndb_tools_dir;
@@ -599,6 +601,8 @@ sub command_line_setup () {
             'with-ndbcluster-all'      => \$opt_with_ndbcluster_all,
             'with-ndbcluster-only'     => \$opt_with_ndbcluster_only,
             'ndb-extra-test'           => \$opt_ndb_extra_test,
             'skip-master-binlog'       => \$opt_skip_master_binlog,
             'skip-slave-binlog'        => \$opt_skip_slave_binlog,
             'do-test=s'                => \$opt_do_test,
             'start-from=s'             => \$opt_start_from,
             'suite=s'                  => \$opt_suite,
@@ -1520,6 +1524,7 @@ sub ndbcluster_start ($) {
  if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
	       ["--port=$opt_ndbcluster_port",
		"--data-dir=$opt_vardir",
	        "--character-sets-dir=$path_charsetsdir",
		"--verbose=2",
	        "--core"],
	       "", "/dev/null", "", "") )
@@ -2157,6 +2162,14 @@ sub run_testcase ($) {
      if ( $using_ndbcluster_master and ! $master->[1]->{'pid'} )
      {
	# Test needs cluster, start an extra mysqld connected to cluster
        # First wait for first mysql server to have created ndb system tables ok
	if ( ! sleep_until_file_created("$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
					$master->[0]->{'start_timeout'},
					$master->[0]->{'pid'}))
	{
          report_failure_and_restart($tinfo);
          return;
	}
        mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
        $master->[1]->{'pid'}=
          mysqld_start('master',1,$tinfo->{'master_opt'},[],
@@ -2555,8 +2568,11 @@ sub mysqld_arguments ($$$$$$) {
  {
    my $id= $idx > 0 ? $idx + 101 : 1;

    if (! $opt_skip_master_binlog)
    {
      mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix,
                  $opt_vardir, $sidx);
    }
    mtr_add_arg($args, "%s--pid-file=%s", $prefix,
                $master->[$idx]->{'path_mypid'});
    mtr_add_arg($args, "%s--port=%d", $prefix,
@@ -2597,9 +2613,12 @@ sub mysqld_arguments ($$$$$$) {
    # FIXME slave get this option twice?!
    mtr_add_arg($args, "%s--exit-info=256", $prefix);
    mtr_add_arg($args, "%s--init-rpl-role=slave", $prefix);
    if (! $opt_skip_slave_binlog)
    {
      mtr_add_arg($args, "%s--log-bin=%s/log/slave%s-bin", $prefix,
                  $opt_vardir, $sidx); # FIXME use own dir for binlogs
      mtr_add_arg($args, "%s--log-slave-updates", $prefix);
    }
    # FIXME option duplicated for slave
    mtr_add_arg($args, "%s--log=%s", $prefix,
                $slave->[$idx]->{'path_mylog'});
+1 −1
Original line number Diff line number Diff line
@@ -1230,7 +1230,7 @@ start_ndbcluster()
    then
      NDBCLUSTER_EXTRA_OPTS="--small"
    fi
    OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --verbose=$NDB_VERBOSE --initial --relative-config-data-dir --core"
    OPTS="$NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --character-sets-dir=$CHARSETSDIR --verbose=$NDB_VERBOSE --initial --relative-config-data-dir --core"
    if [ "x$NDB_VERBOSE" != "x0" ] ; then
      echo "Starting master ndbcluster " $OPTS
    fi
+5 −1
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ VERBOSE=100
NDB_MGM_EXTRA_OPTS=
NDB_MGMD_EXTRA_OPTS=
NDBD_EXTRA_OPTS=
CHARSETSDIR=

while test $# -gt 0; do
  case "$1" in
@@ -119,6 +120,9 @@ while test $# -gt 0; do
    --ndbd-extra-opts=*)
     NDBD_EXTRA_OPTS=`echo "$1" | sed -e "s;--ndbd-extra-opts=;;"`
     ;;
    --character-sets-dir=*)
     CHARSETSDIR=`echo "$1" | sed -e "s;--character-sets-dir=;;"`
     ;;
    --core)
     opt_core="--core"
     ;;
@@ -159,7 +163,7 @@ fi

exec_mgmtclient="$exec_mgmtclient --no-defaults $opt_core $NDB_MGM_EXTRA_OPTS"
exec_mgmtsrvr="$exec_mgmtsrvr --no-defaults $opt_core $NDB_MGMD_EXTRA_OPTS"
exec_ndb="$exec_ndb --no-defaults $opt_core $NDBD_EXTRA_OPTS"
exec_ndb="$exec_ndb --no-defaults $opt_core $NDBD_EXTRA_OPTS --character-sets-dir=$CHARSETSDIR"
exec_waiter="$exec_waiter --no-defaults $opt_core"

ndb_host="localhost"
Loading