Commit 85b58cb4 authored by unknown's avatar unknown
Browse files

Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to...

Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema


parent bae9fc07
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
#
# now setup replication to continue from last epoch
# 1. get apply_status epoch from slave
# 1. get ndb_apply_status epoch from slave
# 2. get corresponding _next_ binlog postition from master
# 3. change master on slave

# 1.
--connection slave
--replace_column 1 <the_epoch>
SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status;
SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
--let $the_epoch= `select @the_epoch`

# 2.
@@ -15,7 +15,7 @@ SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status;
--replace_result $the_epoch <the_epoch>
--replace_column 1 <the_pos>
eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
   FROM mysql.binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
   FROM mysql.ndb_binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
--let $the_pos= `SELECT @the_pos`
--let $the_file= `SELECT @the_file`

+1 −1
Original line number Diff line number Diff line
@@ -634,4 +634,4 @@ CREATE TABLE event (
  PRIMARY KEY  (db, name)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';

CREATE TABLE IF NOT EXISTS mysql.binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
CREATE TABLE IF NOT EXISTS mysql.ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
+4 −4
Original line number Diff line number Diff line
@@ -2456,8 +2456,8 @@ sub ndbcluster_start ($$) {

sub rm_ndbcluster_tables ($) {
  my $dir=       shift;
  foreach my $bin ( glob("$dir/mysql/apply_status*"),
                    glob("$dir/mysql/schema*"))
  foreach my $bin ( glob("$dir/mysql/ndb_apply_status*"),
                    glob("$dir/mysql/ndb_schema*"))
  {
    unlink($bin);
  }
@@ -4127,12 +4127,12 @@ sub run_testcase_start_servers($) {
	# tables ok FIXME This is a workaround so that only one mysqld
	# create the tables
	if ( ! sleep_until_file_created(
		  "$master->[0]->{'path_myddir'}/mysql/apply_status.ndb",
		  "$master->[0]->{'path_myddir'}/mysql/ndb_apply_status.ndb",
					$master->[0]->{'start_timeout'},
					$master->[0]->{'pid'}))
	{

	  $tinfo->{'comment'}= "Failed to create 'mysql/apply_status' table";
	  $tinfo->{'comment'}= "Failed to create 'mysql/ndb_apply_status' table";
	  return 1;
	}
      }
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ mysql
test
show tables in mysql;
Tables_in_mysql
binlog_index
columns_priv
db
event
@@ -16,6 +15,7 @@ help_keyword
help_relation
help_topic
host
ndb_binlog_index
plugin
proc
procs_priv
+3 −3
Original line number Diff line number Diff line
drop table if exists t1,t2;
show tables;
Tables_in_mysql
binlog_index
columns_priv
db
event
@@ -12,6 +11,7 @@ help_keyword
help_relation
help_topic
host
ndb_binlog_index
plugin
proc
procs_priv
@@ -33,7 +33,6 @@ grant ALL on *.* to test@localhost identified by "gambling";
grant ALL on *.* to test@127.0.0.1 identified by "gambling";
show tables;
Tables_in_mysql
binlog_index
columns_priv
db
event
@@ -44,6 +43,7 @@ help_keyword
help_relation
help_topic
host
ndb_binlog_index
plugin
proc
procs_priv
@@ -73,7 +73,6 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number
set password=old_password('gambling3');
show tables;
Tables_in_mysql
binlog_index
columns_priv
db
event
@@ -84,6 +83,7 @@ help_keyword
help_relation
help_topic
host
ndb_binlog_index
plugin
proc
procs_priv
Loading