Commit 85b58cb4 authored by unknown's avatar unknown

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
# #
# now setup replication to continue from last epoch # 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 # 2. get corresponding _next_ binlog postition from master
# 3. change master on slave # 3. change master on slave
# 1. # 1.
--connection slave --connection slave
--replace_column 1 <the_epoch> --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` --let $the_epoch= `select @the_epoch`
# 2. # 2.
...@@ -15,7 +15,7 @@ SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; ...@@ -15,7 +15,7 @@ SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status;
--replace_result $the_epoch <the_epoch> --replace_result $the_epoch <the_epoch>
--replace_column 1 <the_pos> --replace_column 1 <the_pos>
eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) 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_pos= `SELECT @the_pos`
--let $the_file= `SELECT @the_file` --let $the_file= `SELECT @the_file`
......
...@@ -634,4 +634,4 @@ CREATE TABLE event ( ...@@ -634,4 +634,4 @@ CREATE TABLE event (
PRIMARY KEY (db, name) PRIMARY KEY (db, name)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events'; ) 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;
...@@ -2456,8 +2456,8 @@ sub ndbcluster_start ($$) { ...@@ -2456,8 +2456,8 @@ sub ndbcluster_start ($$) {
sub rm_ndbcluster_tables ($) { sub rm_ndbcluster_tables ($) {
my $dir= shift; my $dir= shift;
foreach my $bin ( glob("$dir/mysql/apply_status*"), foreach my $bin ( glob("$dir/mysql/ndb_apply_status*"),
glob("$dir/mysql/schema*")) glob("$dir/mysql/ndb_schema*"))
{ {
unlink($bin); unlink($bin);
} }
...@@ -4127,12 +4127,12 @@ sub run_testcase_start_servers($) { ...@@ -4127,12 +4127,12 @@ sub run_testcase_start_servers($) {
# tables ok FIXME This is a workaround so that only one mysqld # tables ok FIXME This is a workaround so that only one mysqld
# create the tables # create the tables
if ( ! sleep_until_file_created( 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]->{'start_timeout'},
$master->[0]->{'pid'})) $master->[0]->{'pid'}))
{ {
$tinfo->{'comment'}= "Failed to create 'mysql/apply_status' table"; $tinfo->{'comment'}= "Failed to create 'mysql/ndb_apply_status' table";
return 1; return 1;
} }
} }
......
...@@ -5,7 +5,6 @@ mysql ...@@ -5,7 +5,6 @@ mysql
test test
show tables in mysql; show tables in mysql;
Tables_in_mysql Tables_in_mysql
binlog_index
columns_priv columns_priv
db db
event event
...@@ -16,6 +15,7 @@ help_keyword ...@@ -16,6 +15,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
ndb_binlog_index
plugin plugin
proc proc
procs_priv procs_priv
......
drop table if exists t1,t2; drop table if exists t1,t2;
show tables; show tables;
Tables_in_mysql Tables_in_mysql
binlog_index
columns_priv columns_priv
db db
event event
...@@ -12,6 +11,7 @@ help_keyword ...@@ -12,6 +11,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
ndb_binlog_index
plugin plugin
proc proc
procs_priv procs_priv
...@@ -33,7 +33,6 @@ grant ALL on *.* to test@localhost identified by "gambling"; ...@@ -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"; grant ALL on *.* to test@127.0.0.1 identified by "gambling";
show tables; show tables;
Tables_in_mysql Tables_in_mysql
binlog_index
columns_priv columns_priv
db db
event event
...@@ -44,6 +43,7 @@ help_keyword ...@@ -44,6 +43,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
ndb_binlog_index
plugin plugin
proc proc
procs_priv procs_priv
...@@ -73,7 +73,6 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number ...@@ -73,7 +73,6 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number
set password=old_password('gambling3'); set password=old_password('gambling3');
show tables; show tables;
Tables_in_mysql Tables_in_mysql
binlog_index
columns_priv columns_priv
db db
event event
...@@ -84,6 +83,7 @@ help_keyword ...@@ -84,6 +83,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
ndb_binlog_index
plugin plugin
proc proc
procs_priv procs_priv
......
...@@ -33,7 +33,7 @@ create table t3(a int, KEY a_data (a)); ...@@ -33,7 +33,7 @@ create table t3(a int, KEY a_data (a));
create table mysqltest.t4(a int); create table mysqltest.t4(a int);
create table t5 (id int auto_increment primary key); create table t5 (id int auto_increment primary key);
insert into t5 values (10); insert into t5 values (10);
create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status'; create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status';
select * from v1; select * from v1;
c c
CHARACTER_SETS CHARACTER_SETS
...@@ -849,7 +849,7 @@ VIEWS TABLE_NAME select ...@@ -849,7 +849,7 @@ VIEWS TABLE_NAME select
delete from mysql.user where user='mysqltest_4'; delete from mysql.user where user='mysqltest_4';
delete from mysql.db where user='mysqltest_4'; delete from mysql.db where user='mysqltest_4';
flush privileges; flush privileges;
SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status' GROUP BY TABLE_SCHEMA; SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*) table_schema count(*)
information_schema 27 information_schema 27
mysql 21 mysql 21
......
...@@ -280,9 +280,9 @@ create table general_log_new like general_log; ...@@ -280,9 +280,9 @@ create table general_log_new like general_log;
create table slow_log_new like slow_log; create table slow_log_new like slow_log;
show tables like "%log%"; show tables like "%log%";
Tables_in_mysql (%log%) Tables_in_mysql (%log%)
binlog_index
general_log general_log
general_log_new general_log_new
ndb_binlog_index
slow_log slow_log
slow_log_new slow_log_new
drop table slow_log_new, general_log_new; drop table slow_log_new, general_log_new;
......
...@@ -2,7 +2,6 @@ drop database if exists client_test_db; ...@@ -2,7 +2,6 @@ drop database if exists client_test_db;
DROP SCHEMA test; DROP SCHEMA test;
CREATE SCHEMA test; CREATE SCHEMA test;
use test; use test;
mysql.binlog_index OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -14,6 +13,7 @@ mysql.help_keyword OK ...@@ -14,6 +13,7 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
...@@ -26,7 +26,6 @@ mysql.time_zone_name OK ...@@ -26,7 +26,6 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.binlog_index OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -38,6 +37,7 @@ mysql.help_keyword OK ...@@ -38,6 +37,7 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
......
...@@ -6,7 +6,7 @@ drop database mysqltest; ...@@ -6,7 +6,7 @@ drop database mysqltest;
use test; use test;
create table t1 (a int primary key) engine=ndb; create table t1 (a int primary key) engine=ndb;
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
select @max_epoch:=max(epoch)-1 from mysql.binlog_index; select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
@max_epoch:=max(epoch)-1 @max_epoch:=max(epoch)-1
# #
delete from t1; delete from t1;
...@@ -19,19 +19,19 @@ update t2 set b=1 where a=3; ...@@ -19,19 +19,19 @@ update t2 set b=1 where a=3;
delete from t2 where a=4; delete from t2 where a=4;
commit; commit;
drop table t2; drop table t2;
select inserts from mysql.binlog_index where epoch > @max_epoch and inserts > 5; select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5;
inserts inserts
10 10
select deletes from mysql.binlog_index where epoch > @max_epoch and deletes > 5; select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5;
deletes deletes
10 10
select inserts,updates,deletes from select inserts,updates,deletes from
mysql.binlog_index where epoch > @max_epoch and updates > 0; mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0;
inserts updates deletes inserts updates deletes
2 1 1 2 1 1
flush logs; flush logs;
purge master logs before now(); purge master logs before now();
select count(*) from mysql.binlog_index; select count(*) from mysql.ndb_binlog_index;
count(*) count(*)
0 0
create table t1 (a int primary key, b int) engine=ndb; create table t1 (a int primary key, b int) engine=ndb;
...@@ -40,12 +40,12 @@ use mysqltest; ...@@ -40,12 +40,12 @@ use mysqltest;
create table t1 (c int, d int primary key) engine=ndb; create table t1 (c int, d int primary key) engine=ndb;
use test; use test;
insert into mysqltest.t1 values (2,1),(2,2); insert into mysqltest.t1 values (2,1),(2,2);
select @max_epoch:=max(epoch)-1 from mysql.binlog_index; select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
@max_epoch:=max(epoch)-1 @max_epoch:=max(epoch)-1
# #
drop table t1; drop table t1;
drop database mysqltest; drop database mysqltest;
select inserts,updates,deletes from select inserts,updates,deletes from
mysql.binlog_index where epoch > @max_epoch and inserts > 0; mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0;
inserts updates deletes inserts updates deletes
2 0 0 2 0 0
...@@ -44,7 +44,7 @@ show binlog events from <binlog_start>; ...@@ -44,7 +44,7 @@ show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # table_id: # (test.t2) master-bin1.000001 # Table_map # # table_id: # (test.t2)
master-bin1.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin1.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin1.000001 # Write_rows # # table_id: # master-bin1.000001 # Write_rows # # table_id: #
master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin1.000001 # Query # # COMMIT master-bin1.000001 # Query # # COMMIT
...@@ -180,14 +180,14 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -180,14 +180,14 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # use `test`; create table t1 (a int key) engine=ndb master-bin1.000001 # Query # # use `test`; create table t1 (a int key) engine=ndb
master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # table_id: # (test.t1) master-bin1.000001 # Table_map # # table_id: # (test.t1)
master-bin1.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin1.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin1.000001 # Write_rows # # table_id: # master-bin1.000001 # Write_rows # # table_id: #
master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin1.000001 # Query # # COMMIT master-bin1.000001 # Query # # COMMIT
master-bin1.000001 # Query # # use `test`; rename table `test.t1` to `test.t2` master-bin1.000001 # Query # # use `test`; rename table `test.t1` to `test.t2`
master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # table_id: # (test.t2) master-bin1.000001 # Table_map # # table_id: # (test.t2)
master-bin1.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin1.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin1.000001 # Write_rows # # table_id: # master-bin1.000001 # Write_rows # # table_id: #
master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin1.000001 # Query # # COMMIT master-bin1.000001 # Query # # COMMIT
......
...@@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB master-bin1.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB
master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # table_id: # (test.t2) master-bin1.000001 # Table_map # # table_id: # (test.t2)
master-bin1.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin1.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin1.000001 # Write_rows # # table_id: # master-bin1.000001 # Write_rows # # table_id: #
master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin1.000001 # Query # # COMMIT master-bin1.000001 # Query # # COMMIT
...@@ -20,7 +20,7 @@ a b ...@@ -20,7 +20,7 @@ a b
1 1 1 1
2 2 2 2
SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM
mysql.binlog_index ORDER BY epoch DESC LIMIT 1; mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
@the_epoch:=epoch inserts updates deletes schemaops @the_epoch:=epoch inserts updates deletes schemaops
<the_epoch> 2 0 0 0 <the_epoch> 2 0 0 0
SELECT * FROM t2 ORDER BY a; SELECT * FROM t2 ORDER BY a;
...@@ -33,13 +33,13 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -33,13 +33,13 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE t2 master-bin.000001 # Query # # use `test`; DROP TABLE t2
SELECT inserts,updates,deletes,schemaops FROM SELECT inserts,updates,deletes,schemaops FROM
mysql.binlog_index WHERE epoch=<the_epoch>; mysql.ndb_binlog_index WHERE epoch=<the_epoch>;
inserts updates deletes schemaops inserts updates deletes schemaops
2 0 0 0 2 0 0 0
reset master; reset master;
...@@ -51,16 +51,16 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -51,16 +51,16 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB master-bin1.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB
master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # table_id: # (test.t1) master-bin1.000001 # Table_map # # table_id: # (test.t1)
master-bin1.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin1.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin1.000001 # Write_rows # # table_id: # master-bin1.000001 # Write_rows # # table_id: #
master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin1.000001 # Query # # COMMIT master-bin1.000001 # Query # # COMMIT
SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM
mysql.binlog_index ORDER BY epoch DESC LIMIT 1; mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
@the_epoch2:=epoch inserts updates deletes schemaops @the_epoch2:=epoch inserts updates deletes schemaops
<the_epoch2> 2 0 0 0 <the_epoch2> 2 0 0 0
SELECT inserts,updates,deletes,schemaops FROM SELECT inserts,updates,deletes,schemaops FROM
mysql.binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>; mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>;
inserts updates deletes schemaops inserts updates deletes schemaops
2 0 0 0 2 0 0 0
drop table t1; drop table t1;
...@@ -69,12 +69,12 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -69,12 +69,12 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin1.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB master-bin1.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB
master-bin1.000001 # Query # # BEGIN master-bin1.000001 # Query # # BEGIN
master-bin1.000001 # Table_map # # table_id: # (test.t1) master-bin1.000001 # Table_map # # table_id: # (test.t1)
master-bin1.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin1.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin1.000001 # Write_rows # # table_id: # master-bin1.000001 # Write_rows # # table_id: #
master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin1.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin1.000001 # Query # # COMMIT master-bin1.000001 # Query # # COMMIT
master-bin1.000001 # Query # # use `test`; drop table t1 master-bin1.000001 # Query # # use `test`; drop table t1
SELECT inserts,updates,deletes,schemaops FROM SELECT inserts,updates,deletes,schemaops FROM
mysql.binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>; mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>;
inserts updates deletes schemaops inserts updates deletes schemaops
2 0 0 0 2 0 0 0
...@@ -44,7 +44,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; ...@@ -44,7 +44,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SYSTEM_VALUES_ID VALUE SYSTEM_VALUES_ID VALUE
0 2039 0 2039
1 3 1 3
SELECT * FROM mysql.apply_status WHERE server_id=0; SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
server_id epoch server_id epoch
0 151 0 151
TRUNCATE GL; TRUNCATE GL;
...@@ -98,7 +98,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; ...@@ -98,7 +98,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SYSTEM_VALUES_ID VALUE SYSTEM_VALUES_ID VALUE
0 2297 0 2297
1 5 1 5
SELECT * FROM mysql.apply_status WHERE server_id=0; SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
server_id epoch server_id epoch
0 331 0 331
DROP DATABASE BANK; DROP DATABASE BANK;
...@@ -57,7 +57,7 @@ tablespace ts1 storage disk ...@@ -57,7 +57,7 @@ tablespace ts1 storage disk
engine ndb engine ndb
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Table_map # # table_id: # (mysql.apply_status) master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: #
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
......
...@@ -9,14 +9,14 @@ INSERT INTO t1 VALUES ("row1","will go away",1); ...@@ -9,14 +9,14 @@ INSERT INTO t1 VALUES ("row1","will go away",1);
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
c1 c2 c3 c1 c2 c3
row1 will go away 1 row1 will go away 1
SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
@the_epoch:=MAX(epoch) @the_epoch:=MAX(epoch)
<the_epoch> <the_epoch>
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
c1 c2 c3 c1 c2 c3
row1 will go away 1 row1 will go away 1
SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
FROM mysql.binlog_index WHERE epoch = <the_epoch> ; FROM mysql.ndb_binlog_index WHERE epoch = <the_epoch> ;
@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) @the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1)
<the_pos> master-bin.000001 <the_pos> master-bin.000001
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
......
...@@ -22,7 +22,7 @@ master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 ...@@ -22,7 +22,7 @@ master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysql.apply_status) master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows 1 # table_id: # master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
...@@ -30,7 +30,7 @@ master-bin.000001 # Query 1 # use `test`; drop table t1 ...@@ -30,7 +30,7 @@ master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysql.apply_status) master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows 1 # table_id: # master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
...@@ -61,7 +61,7 @@ master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 ...@@ -61,7 +61,7 @@ master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysql.apply_status) master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows 1 # table_id: # master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
...@@ -69,7 +69,7 @@ master-bin.000001 # Query 1 # use `test`; drop table t1 ...@@ -69,7 +69,7 @@ master-bin.000001 # Query 1 # use `test`; drop table t1
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
master-bin.000001 # Query 1 # BEGIN master-bin.000001 # Query 1 # BEGIN
master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Table_map 1 # table_id: # (test.t1)
master-bin.000001 # Table_map 1 # table_id: # (mysql.apply_status) master-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000001 # Write_rows 1 # table_id: # master-bin.000001 # Write_rows 1 # table_id: #
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Query 1 # COMMIT master-bin.000001 # Query 1 # COMMIT
...@@ -81,18 +81,18 @@ master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB ...@@ -81,18 +81,18 @@ master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=NDB
master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
master-bin.000002 # Query 1 # BEGIN master-bin.000002 # Query 1 # BEGIN
master-bin.000002 # Table_map 1 # table_id: # (test.t2) master-bin.000002 # Table_map 1 # table_id: # (test.t2)
master-bin.000002 # Table_map 1 # table_id: # (mysql.apply_status) master-bin.000002 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
master-bin.000002 # Write_rows 1 # table_id: # master-bin.000002 # Write_rows 1 # table_id: #
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000002 # Query 1 # COMMIT master-bin.000002 # Query 1 # COMMIT
show binary logs; show binary logs;
Log_name File_size Log_name File_size
master-bin.000001 1694 master-bin.000001 1702
master-bin.000002 589 master-bin.000002 593
start slave; start slave;
show binary logs; show binary logs;
Log_name File_size Log_name File_size
slave-bin.000001 1789 slave-bin.000001 1797
slave-bin.000002 198 slave-bin.000002 198
show binlog events in 'slave-bin.000001' from 4; show binlog events in 'slave-bin.000001' from 4;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
...@@ -100,7 +100,7 @@ slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 ...@@ -100,7 +100,7 @@ slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
slave-bin.000001 # Query 2 # BEGIN slave-bin.000001 # Query 2 # BEGIN
slave-bin.000001 # Table_map 2 # table_id: # (test.t1) slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
slave-bin.000001 # Table_map 2 # table_id: # (mysql.apply_status) slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000001 # Write_rows 2 # table_id: # slave-bin.000001 # Write_rows 2 # table_id: #
slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT slave-bin.000001 # Query 2 # COMMIT
...@@ -108,7 +108,7 @@ slave-bin.000001 # Query 1 # use `test`; drop table t1 ...@@ -108,7 +108,7 @@ slave-bin.000001 # Query 1 # use `test`; drop table t1
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
slave-bin.000001 # Query 2 # BEGIN slave-bin.000001 # Query 2 # BEGIN
slave-bin.000001 # Table_map 2 # table_id: # (test.t1) slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
slave-bin.000001 # Table_map 2 # table_id: # (mysql.apply_status) slave-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000001 # Write_rows 2 # table_id: # slave-bin.000001 # Write_rows 2 # table_id: #
slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
slave-bin.000001 # Query 2 # COMMIT slave-bin.000001 # Query 2 # COMMIT
...@@ -120,13 +120,13 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 ...@@ -120,13 +120,13 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=NDB
slave-bin.000002 # Query 2 # BEGIN slave-bin.000002 # Query 2 # BEGIN
slave-bin.000002 # Table_map 2 # table_id: # (test.t2) slave-bin.000002 # Table_map 2 # table_id: # (test.t2)
slave-bin.000002 # Table_map 2 # table_id: # (mysql.apply_status) slave-bin.000002 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
slave-bin.000002 # Write_rows 2 # table_id: # slave-bin.000002 # Write_rows 2 # table_id: #
slave-bin.000002 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000002 # Write_rows 2 # table_id: # flags: STMT_END_F
slave-bin.000002 # Query 2 # COMMIT slave-bin.000002 # Query 2 # COMMIT
show slave status; show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 589 # # master-bin.000002 Yes Yes # 0 0 589 # None 0 No # # 127.0.0.1 root MASTER_PORT 1 master-bin.000002 593 # # master-bin.000002 Yes Yes # 0 0 593 # None 0 No #
show binlog events in 'slave-bin.000005' from 4; show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1; DROP TABLE t1;
......
...@@ -16,7 +16,7 @@ row1 will go away 1 ...@@ -16,7 +16,7 @@ row1 will go away 1
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
c1 c2 c3 c1 c2 c3
row1 will go away 1 row1 will go away 1
SELECT @the_epoch:=MAX(epoch) FROM mysql.apply_status; SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
@the_epoch:=MAX(epoch) @the_epoch:=MAX(epoch)
<the_epoch> <the_epoch>
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
...@@ -24,7 +24,7 @@ c1 c2 c3 ...@@ -24,7 +24,7 @@ c1 c2 c3
row1 will go away 1 row1 will go away 1
stop slave; stop slave;
SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
FROM mysql.binlog_index WHERE epoch = <the_epoch> ; FROM mysql.ndb_binlog_index WHERE epoch = <the_epoch> ;
@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) @the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1)
102 master-bin1.000001 102 master-bin1.000001
CHANGE MASTER TO CHANGE MASTER TO
......
...@@ -33,12 +33,12 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 ...@@ -33,12 +33,12 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 219 Query 1 283 BEGIN master-bin.000001 219 Query 1 283 BEGIN
master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) master-bin.000001 283 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 323 Table_map 1 91 table_id: # (mysql.apply_status) master-bin.000001 323 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 374 Write_rows 1 133 table_id: # master-bin.000001 378 Write_rows 1 137 table_id: #
master-bin.000001 416 Write_rows 1 180 table_id: # flags: STMT_END_F master-bin.000001 420 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 463 Query 1 528 COMMIT master-bin.000001 467 Query 1 532 COMMIT
master-bin.000001 528 Query 1 608 use `test`; TRUNCATE TABLE t1 master-bin.000001 532 Query 1 612 use `test`; TRUNCATE TABLE t1
master-bin.000001 608 Query 1 684 use `test`; DROP TABLE t1 master-bin.000001 612 Query 1 688 use `test`; DROP TABLE t1
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
INSERT INTO t1 VALUES (1,1), (2,2); INSERT INTO t1 VALUES (1,1), (2,2);
...@@ -69,23 +69,23 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4 ...@@ -69,23 +69,23 @@ master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 219 Query 1 283 BEGIN master-bin.000001 219 Query 1 283 BEGIN
master-bin.000001 283 Table_map 1 40 table_id: # (test.t1) master-bin.000001 283 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 323 Table_map 1 91 table_id: # (mysql.apply_status) master-bin.000001 323 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 374 Write_rows 1 133 table_id: # master-bin.000001 378 Write_rows 1 137 table_id: #
master-bin.000001 416 Write_rows 1 180 table_id: # flags: STMT_END_F master-bin.000001 420 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 463 Query 1 528 COMMIT master-bin.000001 467 Query 1 532 COMMIT
master-bin.000001 528 Query 1 608 use `test`; TRUNCATE TABLE t1 master-bin.000001 532 Query 1 612 use `test`; TRUNCATE TABLE t1
master-bin.000001 608 Query 1 684 use `test`; DROP TABLE t1 master-bin.000001 612 Query 1 688 use `test`; DROP TABLE t1
master-bin.000001 684 Query 1 801 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB master-bin.000001 688 Query 1 805 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 801 Query 1 865 BEGIN master-bin.000001 805 Query 1 869 BEGIN
master-bin.000001 865 Table_map 1 40 table_id: # (test.t1) master-bin.000001 869 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 905 Table_map 1 91 table_id: # (mysql.apply_status) master-bin.000001 909 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 956 Write_rows 1 133 table_id: # master-bin.000001 964 Write_rows 1 137 table_id: #
master-bin.000001 998 Write_rows 1 180 table_id: # flags: STMT_END_F master-bin.000001 1006 Write_rows 1 184 table_id: # flags: STMT_END_F
master-bin.000001 1045 Query 1 1110 COMMIT master-bin.000001 1053 Query 1 1118 COMMIT
master-bin.000001 1110 Query 1 1174 BEGIN master-bin.000001 1118 Query 1 1182 BEGIN
master-bin.000001 1174 Table_map 1 40 table_id: # (test.t1) master-bin.000001 1182 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 1214 Table_map 1 91 table_id: # (mysql.apply_status) master-bin.000001 1222 Table_map 1 95 table_id: # (mysql.ndb_apply_status)
master-bin.000001 1265 Write_rows 1 133 table_id: # master-bin.000001 1277 Write_rows 1 137 table_id: #
master-bin.000001 1307 Delete_rows 1 172 table_id: # flags: STMT_END_F master-bin.000001 1319 Delete_rows 1 176 table_id: # flags: STMT_END_F
master-bin.000001 1346 Query 1 1411 COMMIT master-bin.000001 1358 Query 1 1423 COMMIT
master-bin.000001 1411 Query 1 1487 use `test`; DROP TABLE t1 master-bin.000001 1423 Query 1 1499 use `test`; DROP TABLE t1
drop table if exists t1,t1aa,t2aa; drop table if exists t1,t1aa,t2aa;
show tables; show tables;
Tables_in_db Tables_in_db
binlog_index
columns_priv columns_priv
db db
event event
...@@ -12,6 +11,7 @@ help_keyword ...@@ -12,6 +11,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
ndb_binlog_index
plugin plugin
proc proc
procs_priv procs_priv
......
...@@ -37,7 +37,7 @@ create table t3(a int, KEY a_data (a)); ...@@ -37,7 +37,7 @@ create table t3(a int, KEY a_data (a));
create table mysqltest.t4(a int); create table mysqltest.t4(a int);
create table t5 (id int auto_increment primary key); create table t5 (id int auto_increment primary key);
insert into t5 values (10); insert into t5 values (10);
create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status'; create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status';
select * from v1; select * from v1;
select c,table_name from v1 select c,table_name from v1
...@@ -528,7 +528,7 @@ flush privileges; ...@@ -528,7 +528,7 @@ flush privileges;
# Bug #9404 information_schema: Weird error messages # Bug #9404 information_schema: Weird error messages
# with SELECT SUM() ... GROUP BY queries # with SELECT SUM() ... GROUP BY queries
# #
SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status' GROUP BY TABLE_SCHEMA; SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
# #
......
...@@ -41,7 +41,7 @@ select * from t2 order by a limit 3; ...@@ -41,7 +41,7 @@ select * from t2 order by a limit 3;
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
# to ensure mysqld has connected again, and recreated system tables # to ensure mysqld has connected again, and recreated system tables
--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster apply_status >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT
sleep 2; sleep 2;
--connection server2 --connection server2
--error ER_NO_SUCH_TABLE --error ER_NO_SUCH_TABLE
...@@ -60,7 +60,7 @@ reset master; ...@@ -60,7 +60,7 @@ reset master;
--exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
# to ensure mysqld has connected again, and recreated system tables # to ensure mysqld has connected again, and recreated system tables
--exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster apply_status >> $NDB_TOOLS_OUTPUT --exec $NDB_TOOLS_DIR/ndb_desc --no-defaults -r 30 -d cluster ndb_apply_status >> $NDB_TOOLS_OUTPUT
sleep 2; sleep 2;
--connection server1 --connection server1
--error ER_NO_SUCH_TABLE --error ER_NO_SUCH_TABLE
......
...@@ -12,14 +12,14 @@ use test; ...@@ -12,14 +12,14 @@ use test;
# #
# basic insert, update, delete test, alter, rename, drop # basic insert, update, delete test, alter, rename, drop
# check that binlog_index gets the right info # check that ndb_binlog_index gets the right info
# #
create table t1 (a int primary key) engine=ndb; create table t1 (a int primary key) engine=ndb;
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
save_master_pos; save_master_pos;
--replace_column 1 # --replace_column 1 #
select @max_epoch:=max(epoch)-1 from mysql.binlog_index; select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
delete from t1; delete from t1;
alter table t1 add (b int); alter table t1 add (b int);
...@@ -38,18 +38,18 @@ drop table t2; ...@@ -38,18 +38,18 @@ drop table t2;
# (save_master_pos waits for last gcp to complete, ensuring that we have # (save_master_pos waits for last gcp to complete, ensuring that we have
# the expected data in the binlog) # the expected data in the binlog)
save_master_pos; save_master_pos;
select inserts from mysql.binlog_index where epoch > @max_epoch and inserts > 5; select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5;
select deletes from mysql.binlog_index where epoch > @max_epoch and deletes > 5; select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5;
select inserts,updates,deletes from select inserts,updates,deletes from
mysql.binlog_index where epoch > @max_epoch and updates > 0; mysql.ndb_binlog_index where epoch > @max_epoch and updates > 0;
# #
# check that purge clears the binlog_index # check that purge clears the ndb_binlog_index
# #
flush logs; flush logs;
--sleep 1 --sleep 1
purge master logs before now(); purge master logs before now();
select count(*) from mysql.binlog_index; select count(*) from mysql.ndb_binlog_index;
# #
# several tables in different databases # several tables in different databases
...@@ -64,9 +64,9 @@ use test; ...@@ -64,9 +64,9 @@ use test;
insert into mysqltest.t1 values (2,1),(2,2); insert into mysqltest.t1 values (2,1),(2,2);
save_master_pos; save_master_pos;
--replace_column 1 # --replace_column 1 #
select @max_epoch:=max(epoch)-1 from mysql.binlog_index; select @max_epoch:=max(epoch)-1 from mysql.ndb_binlog_index;
drop table t1; drop table t1;
drop database mysqltest; drop database mysqltest;
select inserts,updates,deletes from select inserts,updates,deletes from
mysql.binlog_index where epoch > @max_epoch and inserts > 0; mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 0;
...@@ -38,7 +38,7 @@ INSERT INTO t2 VALUES (1,1),(2,2); ...@@ -38,7 +38,7 @@ INSERT INTO t2 VALUES (1,1),(2,2);
select * from t2 order by a; select * from t2 order by a;
--replace_column 1 <the_epoch> --replace_column 1 <the_epoch>
SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM
mysql.binlog_index ORDER BY epoch DESC LIMIT 1; mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
let $the_epoch= `SELECT @the_epoch`; let $the_epoch= `SELECT @the_epoch`;
# see if we got something on server1 # see if we got something on server1
...@@ -50,7 +50,7 @@ DROP TABLE t2; ...@@ -50,7 +50,7 @@ DROP TABLE t2;
--source include/show_binlog_events.inc --source include/show_binlog_events.inc
--replace_result $the_epoch <the_epoch> --replace_result $the_epoch <the_epoch>
eval SELECT inserts,updates,deletes,schemaops FROM eval SELECT inserts,updates,deletes,schemaops FROM
mysql.binlog_index WHERE epoch=$the_epoch; mysql.ndb_binlog_index WHERE epoch=$the_epoch;
# reset for next test # reset for next test
connection server1; connection server1;
...@@ -65,12 +65,12 @@ INSERT INTO t1 VALUES (1),(2); ...@@ -65,12 +65,12 @@ INSERT INTO t1 VALUES (1),(2);
--source include/show_binlog_events.inc --source include/show_binlog_events.inc
--replace_column 1 <the_epoch2> --replace_column 1 <the_epoch2>
SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM
mysql.binlog_index ORDER BY epoch DESC LIMIT 1; mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
let $the_epoch2= `SELECT @the_epoch2`; let $the_epoch2= `SELECT @the_epoch2`;
--replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2> --replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
eval SELECT inserts,updates,deletes,schemaops FROM eval SELECT inserts,updates,deletes,schemaops FROM
mysql.binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2;
# now see that we have the events on the other server # now see that we have the events on the other server
connection server2; connection server2;
...@@ -80,4 +80,4 @@ drop table t1; ...@@ -80,4 +80,4 @@ drop table t1;
--source include/show_binlog_events.inc --source include/show_binlog_events.inc
--replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2> --replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
eval SELECT inserts,updates,deletes,schemaops FROM eval SELECT inserts,updates,deletes,schemaops FROM
mysql.binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2; mysql.ndb_binlog_index WHERE epoch > $the_epoch AND epoch <= $the_epoch2;
...@@ -21,7 +21,7 @@ SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; ...@@ -21,7 +21,7 @@ SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION; SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM mysql.apply_status WHERE server_id=0; SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
# #
# verify restore of 5.0 backup # verify restore of 5.0 backup
...@@ -39,5 +39,5 @@ SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE; ...@@ -39,5 +39,5 @@ SELECT * FROM GL ORDER BY TIME,ACCOUNT_TYPE;
SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID; SELECT * FROM ACCOUNT ORDER BY ACCOUNT_ID;
SELECT COUNT(*) FROM TRANSACTION; SELECT COUNT(*) FROM TRANSACTION;
SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID; SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
SELECT * FROM mysql.apply_status WHERE server_id=0; SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
DROP DATABASE BANK; DROP DATABASE BANK;
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Currently test only works with ndb since it retrieves "old" # Currently test only works with ndb since it retrieves "old"
# binlog positions with mysql.binlog_index and apply_status; # binlog positions with mysql.ndb_binlog_index and ndb_apply_status;
# #
# create a table with one row # create a table with one row
...@@ -15,7 +15,7 @@ SELECT * FROM t1 ORDER BY c3; ...@@ -15,7 +15,7 @@ SELECT * FROM t1 ORDER BY c3;
# sync slave and retrieve epoch # sync slave and retrieve epoch
sync_slave_with_master; sync_slave_with_master;
--replace_column 1 <the_epoch> --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` ; let $the_epoch= `select @the_epoch` ;
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
...@@ -24,7 +24,7 @@ connection master; ...@@ -24,7 +24,7 @@ connection master;
--replace_result $the_epoch <the_epoch> --replace_result $the_epoch <the_epoch>
--replace_column 1 <the_pos> --replace_column 1 <the_pos>
eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
FROM mysql.binlog_index WHERE epoch = $the_epoch ; FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ;
let $the_pos= `SELECT @the_pos` ; let $the_pos= `SELECT @the_pos` ;
let $the_file= `SELECT @the_file` ; let $the_file= `SELECT @the_file` ;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# Currently test only works with ndb since it retrieves "old" # Currently test only works with ndb since it retrieves "old"
# binlog positions with mysql.binlog_index and apply_status; # binlog positions with mysql.ndb_binlog_index and ndb_apply_status;
# #
# create a table with one row, and make sure the other "master" gets it # create a table with one row, and make sure the other "master" gets it
...@@ -25,7 +25,7 @@ SELECT * FROM t1 ORDER BY c3; ...@@ -25,7 +25,7 @@ SELECT * FROM t1 ORDER BY c3;
connection master; connection master;
sync_slave_with_master; sync_slave_with_master;
--replace_column 1 <the_epoch> --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` ; let $the_epoch= `select @the_epoch` ;
SELECT * FROM t1 ORDER BY c3; SELECT * FROM t1 ORDER BY c3;
stop slave; stop slave;
...@@ -34,7 +34,7 @@ stop slave; ...@@ -34,7 +34,7 @@ stop slave;
connection server2; connection server2;
--replace_result $the_epoch <the_epoch> --replace_result $the_epoch <the_epoch>
eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
FROM mysql.binlog_index WHERE epoch = $the_epoch ; FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ;
let $the_pos= `SELECT @the_pos` ; let $the_pos= `SELECT @the_pos` ;
let $the_file= `SELECT @the_file` ; let $the_file= `SELECT @the_file` ;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# #
# Currently test only works with ndb since it retrieves "old" # Currently test only works with ndb since it retrieves "old"
# binlog positions with mysql.binlog_index and apply_status; # binlog positions with mysql.ndb_binlog_index and ndb_apply_status;
# #
# stop the save # stop the save
...@@ -94,11 +94,11 @@ STOP SLAVE; ...@@ -94,11 +94,11 @@ STOP SLAVE;
--connection master --connection master
reset master; reset master;
# should now contain nothing # should now contain nothing
select * from mysql.binlog_index; select * from mysql.ndb_binlog_index;
--connection slave --connection slave
reset slave; reset slave;
# should now contain nothing # should now contain nothing
select * from mysql.apply_status; select * from mysql.ndb_apply_status;
# End 5.1 Test # End 5.1 Test
...@@ -96,7 +96,7 @@ INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N',' ...@@ -96,7 +96,7 @@ INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv,
procs_priv, help_category, help_keyword, help_relation, help_topic, proc, procs_priv, help_category, help_keyword, help_relation, help_topic, proc,
time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition,
time_zone_transition_type, general_log, slow_log, event, binlog_index; time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
-- enable_query_log -- enable_query_log
......
...@@ -874,7 +874,7 @@ $c_pp ...@@ -874,7 +874,7 @@ $c_pp
$c_gl $c_gl
$c_sl $c_sl
$c_ev $c_ev
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;
END_OF_DATA END_OF_DATA
...@@ -687,7 +687,7 @@ ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete ...@@ -687,7 +687,7 @@ ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete
UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0; UPDATE user SET Trigger_priv=Super_priv WHERE @hadTriggerPriv = 0;
CREATE TABLE IF NOT EXISTS 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 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;
# Activate the new, possible modified privilege tables # Activate the new, possible modified privilege tables
# This should not be needed, but gives us some extra testing that the above # This should not be needed, but gives us some extra testing that the above
......
...@@ -4769,7 +4769,7 @@ int ha_ndbcluster::create(const char *name, ...@@ -4769,7 +4769,7 @@ int ha_ndbcluster::create(const char *name,
schema distribution table is setup schema distribution table is setup
( unless it is a creation of the schema dist table itself ) ( unless it is a creation of the schema dist table itself )
*/ */
if (!schema_share && if (!ndb_schema_share &&
!(strcmp(m_dbname, NDB_REP_DB) == 0 && !(strcmp(m_dbname, NDB_REP_DB) == 0 &&
strcmp(m_tabname, NDB_SCHEMA_TABLE) == 0)) strcmp(m_tabname, NDB_SCHEMA_TABLE) == 0))
{ {
...@@ -4974,7 +4974,7 @@ int ha_ndbcluster::create(const char *name, ...@@ -4974,7 +4974,7 @@ int ha_ndbcluster::create(const char *name,
ndb_rep_event_name(&event_name,m_dbname,m_tabname); ndb_rep_event_name(&event_name,m_dbname,m_tabname);
int do_event_op= ndb_binlog_running; int do_event_op= ndb_binlog_running;
if (!schema_share && if (!ndb_schema_share &&
strcmp(share->db, NDB_REP_DB) == 0 && strcmp(share->db, NDB_REP_DB) == 0 &&
strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0) strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
do_event_op= 1; do_event_op= 1;
...@@ -5464,7 +5464,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb, ...@@ -5464,7 +5464,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
Don't allow drop table unless Don't allow drop table unless
schema distribution table is setup schema distribution table is setup
*/ */
if (!schema_share) if (!ndb_schema_share)
{ {
DBUG_PRINT("info", ("Schema distribution table not setup")); DBUG_PRINT("info", ("Schema distribution table not setup"));
DBUG_RETURN(HA_ERR_NO_CONNECTION); DBUG_RETURN(HA_ERR_NO_CONNECTION);
...@@ -5623,7 +5623,7 @@ int ha_ndbcluster::delete_table(const char *name) ...@@ -5623,7 +5623,7 @@ int ha_ndbcluster::delete_table(const char *name)
Don't allow drop table unless Don't allow drop table unless
schema distribution table is setup schema distribution table is setup
*/ */
if (!schema_share) if (!ndb_schema_share)
{ {
DBUG_PRINT("info", ("Schema distribution table not setup")); DBUG_PRINT("info", ("Schema distribution table not setup"));
DBUG_RETURN(HA_ERR_NO_CONNECTION); DBUG_RETURN(HA_ERR_NO_CONNECTION);
...@@ -6189,7 +6189,7 @@ static void ndbcluster_drop_database(handlerton *hton, char *path) ...@@ -6189,7 +6189,7 @@ static void ndbcluster_drop_database(handlerton *hton, char *path)
Don't allow drop database unless Don't allow drop database unless
schema distribution table is setup schema distribution table is setup
*/ */
if (!schema_share) if (!ndb_schema_share)
{ {
DBUG_PRINT("info", ("Schema distribution table not setup")); DBUG_PRINT("info", ("Schema distribution table not setup"));
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
...@@ -8407,7 +8407,8 @@ pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused))) ...@@ -8407,7 +8407,8 @@ pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused)))
#ifdef HAVE_NDB_BINLOG #ifdef HAVE_NDB_BINLOG
/* /*
Check that the apply_status_share and schema_share has been created. Check that the ndb_apply_status_share and ndb_schema_share
have been created.
If not try to create it If not try to create it
*/ */
if (!ndb_binlog_tables_inited) if (!ndb_binlog_tables_inited)
......
This diff is collapsed.
...@@ -157,11 +157,11 @@ int ndbcluster_binlog_start(); ...@@ -157,11 +157,11 @@ int ndbcluster_binlog_start();
pthread_handler_t ndb_binlog_thread_func(void *arg); pthread_handler_t ndb_binlog_thread_func(void *arg);
/* /*
table cluster_replication.apply_status table mysql.ndb_apply_status
*/ */
int ndbcluster_setup_binlog_table_shares(THD *thd); int ndbcluster_setup_binlog_table_shares(THD *thd);
extern NDB_SHARE *apply_status_share; extern NDB_SHARE *ndb_apply_status_share;
extern NDB_SHARE *schema_share; extern NDB_SHARE *ndb_schema_share;
extern THD *injector_thd; extern THD *injector_thd;
extern my_bool ndb_binlog_running; extern my_bool ndb_binlog_running;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
#define NDB_REP_DB "mysql" #define NDB_REP_DB "mysql"
#define NDB_REP_TABLE "binlog_index" #define NDB_REP_TABLE "ndb_binlog_index"
#define NDB_APPLY_TABLE "apply_status" #define NDB_APPLY_TABLE "ndb_apply_status"
#define NDB_SCHEMA_TABLE "schema" #define OLD_NDB_APPLY_TABLE "apply_status"
#define NDB_SCHEMA_TABLE "ndb_schema"
...@@ -305,8 +305,8 @@ RestoreMetaData::markSysTables() ...@@ -305,8 +305,8 @@ RestoreMetaData::markSysTables()
before we changed the database name of the tables from before we changed the database name of the tables from
"cluster_replication" -> "cluster" -> "mysql" "cluster_replication" -> "cluster" -> "mysql"
*/ */
strcmp(tableName, "cluster_replication/def/" NDB_APPLY_TABLE) == 0 || strcmp(tableName, "cluster_replication/def/" OLD_NDB_APPLY_TABLE) == 0 ||
strcmp(tableName, "cluster/def/" NDB_APPLY_TABLE) == 0 || strcmp(tableName, "cluster/def/" OLD_NDB_APPLY_TABLE) == 0 ||
strcmp(tableName, NDB_REP_DB "/def/" NDB_APPLY_TABLE) == 0 || strcmp(tableName, NDB_REP_DB "/def/" NDB_APPLY_TABLE) == 0 ||
strcmp(tableName, NDB_REP_DB "/def/" NDB_SCHEMA_TABLE)== 0 ) strcmp(tableName, NDB_REP_DB "/def/" NDB_SCHEMA_TABLE)== 0 )
table->isSysTable = true; table->isSysTable = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment