diff --git a/mysql-test/include/ndb_setup_slave.inc b/mysql-test/include/ndb_setup_slave.inc
index 3cda48755b9852a93d3ed6edc7de77e7a06f2177..5ee551505502eb7648dcfd314ae2ce1ecce38b3e 100644
--- a/mysql-test/include/ndb_setup_slave.inc
+++ b/mysql-test/include/ndb_setup_slave.inc
@@ -1,13 +1,13 @@
 #
 # 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`
 
diff --git a/mysql-test/lib/init_db.sql b/mysql-test/lib/init_db.sql
index b7618b3ab46375c3d44ee1191acf1c5babbde758..fcef17eab9bf252052065754ea1e227fbd4e0c00 100644
--- a/mysql-test/lib/init_db.sql
+++ b/mysql-test/lib/init_db.sql
@@ -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;
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 6ec55c5f4d6fc541885eaab40f2e109b49ec32a8..b363e908d36ee995edbcec8bb2d53ae3ee70ecab 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -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;
 	}
       }
diff --git a/mysql-test/r/1st.result b/mysql-test/r/1st.result
index 7e35f1a7ce635e61931624f63ba0485c8ed62753..274a23cc48c7ac2a33dd485a1fc23096b73e0929 100644
--- a/mysql-test/r/1st.result
+++ b/mysql-test/r/1st.result
@@ -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
diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result
index 08710217afc1c2fe7fc20f2997553159ce01bb48..a222d11cb503d1522fe213abd43526baa4ce8585 100644
--- a/mysql-test/r/connect.result
+++ b/mysql-test/r/connect.result
@@ -1,7 +1,6 @@
 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
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index d910be98cf4eecf235570053c27667b367e754ac..e8f7eed54f47d2c9bd25529a20fd8b52849c61eb 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -33,7 +33,7 @@ create table t3(a int, KEY a_data (a));
 create table mysqltest.t4(a int);
 create table t5 (id int auto_increment primary key);
 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;
 c
 CHARACTER_SETS
@@ -849,7 +849,7 @@ VIEWS	TABLE_NAME	select
 delete from mysql.user where user='mysqltest_4';
 delete from mysql.db where user='mysqltest_4';
 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(*)
 information_schema	27
 mysql	21
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index d9d754c91e6a4821ad1acc8d7780122f2edd6c85..3e8b7d32e8858cd5ad9c40b84e24d5f00dc64e86 100644
--- a/mysql-test/r/log_tables.result
+++ b/mysql-test/r/log_tables.result
@@ -280,9 +280,9 @@ create table general_log_new like general_log;
 create table slow_log_new like slow_log;
 show tables like "%log%";
 Tables_in_mysql (%log%)
-binlog_index
 general_log
 general_log_new
+ndb_binlog_index
 slow_log
 slow_log_new
 drop table slow_log_new, general_log_new;
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index d6149981f3752bb23c55207c62208117877954d0..37d0f6ebeeb245c55fd682bf1c193a407d3cacb4 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -2,7 +2,6 @@ drop database if exists client_test_db;
 DROP SCHEMA test;
 CREATE SCHEMA test;
 use test;
-mysql.binlog_index                                 OK
 mysql.columns_priv                                 OK
 mysql.db                                           OK
 mysql.event                                        OK
@@ -14,6 +13,7 @@ mysql.help_keyword                                 OK
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
+mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
@@ -26,7 +26,6 @@ mysql.time_zone_name                               OK
 mysql.time_zone_transition                         OK
 mysql.time_zone_transition_type                    OK
 mysql.user                                         OK
-mysql.binlog_index                                 OK
 mysql.columns_priv                                 OK
 mysql.db                                           OK
 mysql.event                                        OK
@@ -38,6 +37,7 @@ mysql.help_keyword                                 OK
 mysql.help_relation                                OK
 mysql.help_topic                                   OK
 mysql.host                                         OK
+mysql.ndb_binlog_index                             OK
 mysql.plugin                                       OK
 mysql.proc                                         OK
 mysql.procs_priv                                   OK
diff --git a/mysql-test/r/ndb_binlog_basic.result b/mysql-test/r/ndb_binlog_basic.result
index 43c19278d2c445ae391146b67d3f0a657d65060d..931d01dbebe0e4d9c67247fdd15414db9f659220 100644
--- a/mysql-test/r/ndb_binlog_basic.result
+++ b/mysql-test/r/ndb_binlog_basic.result
@@ -6,7 +6,7 @@ drop database mysqltest;
 use test;
 create table t1 (a int primary key) engine=ndb;
 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
 #
 delete from t1;
@@ -19,19 +19,19 @@ update t2 set b=1 where a=3;
 delete from t2 where a=4;
 commit;
 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
 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
 10
 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
 2	1	1
 flush logs;
 purge master logs before now();
-select count(*) from mysql.binlog_index;
+select count(*) from mysql.ndb_binlog_index;
 count(*)
 0
 create table t1 (a int primary key, b int) engine=ndb;
@@ -40,12 +40,12 @@ use mysqltest;
 create table t1 (c int, d int primary key) engine=ndb;
 use test;
 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
 #
 drop table t1;
 drop database mysqltest;
 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
 2	0	0
diff --git a/mysql-test/r/ndb_binlog_ddl_multi.result b/mysql-test/r/ndb_binlog_ddl_multi.result
index ff9c3bdc3e44e9be0960a3e28b780b4afd91c7ce..eff91eca23689d64ce3fdf8fce77667b2715e50d 100644
--- a/mysql-test/r/ndb_binlog_ddl_multi.result
+++ b/mysql-test/r/ndb_binlog_ddl_multi.result
@@ -44,7 +44,7 @@ show binlog events from <binlog_start>;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin1.000001	#	Query	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin1.000001	#	Query	#	#	COMMIT
@@ -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	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin1.000001	#	Query	#	#	COMMIT
 master-bin1.000001	#	Query	#	#	use `test`; rename table `test.t1` to `test.t2`
 master-bin1.000001	#	Query	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin1.000001	#	Query	#	#	COMMIT
diff --git a/mysql-test/r/ndb_binlog_multi.result b/mysql-test/r/ndb_binlog_multi.result
index ffd0b44484b64a4b2603f1e8241850bc4513ecf0..3a84c89a7a47a5e3be4049098479751eda151aea 100644
--- a/mysql-test/r/ndb_binlog_multi.result
+++ b/mysql-test/r/ndb_binlog_multi.result
@@ -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	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin1.000001	#	Query	#	#	COMMIT
@@ -20,7 +20,7 @@ a	b
 1	1
 2	2
 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>	2	0	0	0
 SELECT * FROM t2 ORDER BY a;
@@ -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	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
 master-bin.000001	#	Query	#	#	use `test`; DROP TABLE t2
 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
 2	0	0	0
 reset master;
@@ -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	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin1.000001	#	Query	#	#	COMMIT
 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>	2	0	0	0
 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
 2	0	0	0
 drop table t1;
@@ -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	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin1.000001	#	Query	#	#	COMMIT
 master-bin1.000001	#	Query	#	#	use `test`; drop table t1
 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
 2	0	0	0
diff --git a/mysql-test/r/ndb_restore_compat.result b/mysql-test/r/ndb_restore_compat.result
index 595c582e3b7b33fa39782c9a3d90609cb63b9ce8..f580f680687b706f1de939a6e8fcdc765fe40b85 100644
--- a/mysql-test/r/ndb_restore_compat.result
+++ b/mysql-test/r/ndb_restore_compat.result
@@ -44,7 +44,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
 SYSTEM_VALUES_ID	VALUE
 0	2039
 1	3
-SELECT * FROM mysql.apply_status WHERE server_id=0;
+SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
 server_id	epoch
 0	151
 TRUNCATE GL;
@@ -98,7 +98,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYSTEM_VALUES_ID;
 SYSTEM_VALUES_ID	VALUE
 0	2297
 1	5
-SELECT * FROM mysql.apply_status WHERE server_id=0;
+SELECT * FROM mysql.ndb_apply_status WHERE server_id=0;
 server_id	epoch
 0	331
 DROP DATABASE BANK;
diff --git a/mysql-test/r/rpl_ndb_dd_basic.result b/mysql-test/r/rpl_ndb_dd_basic.result
index 7532376742744910d2faa5057a578b5394e3288d..245be1cc0a932011a13268dd5790af30eed77ece 100644
--- a/mysql-test/r/rpl_ndb_dd_basic.result
+++ b/mysql-test/r/rpl_ndb_dd_basic.result
@@ -57,7 +57,7 @@ tablespace ts1 storage disk
 engine ndb
 master-bin.000001	#	Query	#	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000001	#	Query	#	#	COMMIT
diff --git a/mysql-test/r/rpl_ndb_idempotent.result b/mysql-test/r/rpl_ndb_idempotent.result
index e8a96aec13706e01d6fa3156833657083cac3570..982cab334821f6398950319055090f1a52207a3c 100644
--- a/mysql-test/r/rpl_ndb_idempotent.result
+++ b/mysql-test/r/rpl_ndb_idempotent.result
@@ -9,14 +9,14 @@ INSERT INTO t1 VALUES ("row1","will go away",1);
 SELECT * FROM t1 ORDER BY c3;
 c1	c2	c3
 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>
 SELECT * FROM t1 ORDER BY c3;
 c1	c2	c3
 row1	will go away	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>	master-bin.000001
 INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
diff --git a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result
index a594fa6c1dc3819a261174ea6e0870d1c7ffc64e..66db8c24bb2515b1ba2019f72151a2ce26def357 100644
--- a/mysql-test/r/rpl_ndb_log.result
+++ b/mysql-test/r/rpl_ndb_log.result
@@ -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	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
@@ -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	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
@@ -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	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
@@ -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	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000001	#	Query	1	#	COMMIT
@@ -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	#	BEGIN
 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: # flags: STMT_END_F
 master-bin.000002	#	Query	1	#	COMMIT
 show binary logs;
 Log_name	File_size
-master-bin.000001	1694
-master-bin.000002	589
+master-bin.000001	1702
+master-bin.000002	593
 start slave;
 show binary logs;
 Log_name	File_size
-slave-bin.000001	1789
+slave-bin.000001	1797
 slave-bin.000002	198
 show binlog events in 'slave-bin.000001' from 4;
 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
 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	#	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: # flags: STMT_END_F
 slave-bin.000001	#	Query	2	#	COMMIT
@@ -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	2	#	BEGIN
 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: # flags: STMT_END_F
 slave-bin.000001	#	Query	2	#	COMMIT
@@ -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	2	#	BEGIN
 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: # flags: STMT_END_F
 slave-bin.000002	#	Query	2	#	COMMIT
 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
-#	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;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;
diff --git a/mysql-test/r/rpl_ndb_multi.result b/mysql-test/r/rpl_ndb_multi.result
index 74e06b5ff3845bd5fd4c399d5253d1b247eaf1ec..66819c2c9c8d43d63d3b0294e0954d20506bb41c 100644
--- a/mysql-test/r/rpl_ndb_multi.result
+++ b/mysql-test/r/rpl_ndb_multi.result
@@ -16,7 +16,7 @@ row1	will go away	1
 SELECT * FROM t1 ORDER BY c3;
 c1	c2	c3
 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>
 SELECT * FROM t1 ORDER BY c3;
@@ -24,7 +24,7 @@ c1	c2	c3
 row1	will go away	1
 stop slave;
 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)
 102	master-bin1.000001
 CHANGE MASTER TO
diff --git a/mysql-test/r/rpl_truncate_7ndb.result b/mysql-test/r/rpl_truncate_7ndb.result
index c57eb2e1daec4face89278387e4cd1758a647a2a..63d4b0f94116e8303006ea211e0e03944dd2859c 100644
--- a/mysql-test/r/rpl_truncate_7ndb.result
+++ b/mysql-test/r/rpl_truncate_7ndb.result
@@ -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	219	Query	1	283	BEGIN
 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	374	Write_rows	1	133	table_id: #
-master-bin.000001	416	Write_rows	1	180	table_id: # flags: STMT_END_F
-master-bin.000001	463	Query	1	528	COMMIT
-master-bin.000001	528	Query	1	608	use `test`; TRUNCATE TABLE t1
-master-bin.000001	608	Query	1	684	use `test`; DROP TABLE t1
+master-bin.000001	323	Table_map	1	95	table_id: # (mysql.ndb_apply_status)
+master-bin.000001	378	Write_rows	1	137	table_id: #
+master-bin.000001	420	Write_rows	1	184	table_id: # flags: STMT_END_F
+master-bin.000001	467	Query	1	532	COMMIT
+master-bin.000001	532	Query	1	612	use `test`; TRUNCATE TABLE t1
+master-bin.000001	612	Query	1	688	use `test`; DROP TABLE t1
 **** On Master ****
 CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
 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
 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	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	374	Write_rows	1	133	table_id: #
-master-bin.000001	416	Write_rows	1	180	table_id: # flags: STMT_END_F
-master-bin.000001	463	Query	1	528	COMMIT
-master-bin.000001	528	Query	1	608	use `test`; TRUNCATE TABLE t1
-master-bin.000001	608	Query	1	684	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	801	Query	1	865	BEGIN
-master-bin.000001	865	Table_map	1	40	table_id: # (test.t1)
-master-bin.000001	905	Table_map	1	91	table_id: # (mysql.apply_status)
-master-bin.000001	956	Write_rows	1	133	table_id: #
-master-bin.000001	998	Write_rows	1	180	table_id: # flags: STMT_END_F
-master-bin.000001	1045	Query	1	1110	COMMIT
-master-bin.000001	1110	Query	1	1174	BEGIN
-master-bin.000001	1174	Table_map	1	40	table_id: # (test.t1)
-master-bin.000001	1214	Table_map	1	91	table_id: # (mysql.apply_status)
-master-bin.000001	1265	Write_rows	1	133	table_id: #
-master-bin.000001	1307	Delete_rows	1	172	table_id: # flags: STMT_END_F
-master-bin.000001	1346	Query	1	1411	COMMIT
-master-bin.000001	1411	Query	1	1487	use `test`; DROP TABLE t1
+master-bin.000001	323	Table_map	1	95	table_id: # (mysql.ndb_apply_status)
+master-bin.000001	378	Write_rows	1	137	table_id: #
+master-bin.000001	420	Write_rows	1	184	table_id: # flags: STMT_END_F
+master-bin.000001	467	Query	1	532	COMMIT
+master-bin.000001	532	Query	1	612	use `test`; TRUNCATE TABLE t1
+master-bin.000001	612	Query	1	688	use `test`; DROP TABLE t1
+master-bin.000001	688	Query	1	805	use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
+master-bin.000001	805	Query	1	869	BEGIN
+master-bin.000001	869	Table_map	1	40	table_id: # (test.t1)
+master-bin.000001	909	Table_map	1	95	table_id: # (mysql.ndb_apply_status)
+master-bin.000001	964	Write_rows	1	137	table_id: #
+master-bin.000001	1006	Write_rows	1	184	table_id: # flags: STMT_END_F
+master-bin.000001	1053	Query	1	1118	COMMIT
+master-bin.000001	1118	Query	1	1182	BEGIN
+master-bin.000001	1182	Table_map	1	40	table_id: # (test.t1)
+master-bin.000001	1222	Table_map	1	95	table_id: # (mysql.ndb_apply_status)
+master-bin.000001	1277	Write_rows	1	137	table_id: #
+master-bin.000001	1319	Delete_rows	1	176	table_id: # flags: STMT_END_F
+master-bin.000001	1358	Query	1	1423	COMMIT
+master-bin.000001	1423	Query	1	1499	use `test`; DROP TABLE t1
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index ab140fe27828309bbdb2be60216122176e1371dc..6bbd0adfc49098903d5100bb9a69e99de0808634 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -1,7 +1,6 @@
 drop table if exists t1,t1aa,t2aa;
 show tables;
 Tables_in_db
-binlog_index
 columns_priv
 db
 event
@@ -12,6 +11,7 @@ help_keyword
 help_relation
 help_topic
 host
+ndb_binlog_index
 plugin
 proc
 procs_priv
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index cec140a5e6340c95afb9adcbf40e95f21cf11eef..6cf26acd40d635f536a787442782ea89a66ba3c1 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -37,7 +37,7 @@ create table t3(a int, KEY a_data (a));
 create table mysqltest.t4(a int);
 create table t5 (id int auto_increment primary key);
 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 c,table_name from v1 
@@ -528,7 +528,7 @@ flush privileges;
 # Bug #9404  information_schema: Weird error messages
 # 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;
 
 
 #
diff --git a/mysql-test/t/ndb_autodiscover3.test b/mysql-test/t/ndb_autodiscover3.test
index 4c072ada0ec1dadb8bd874198db1102c94585d52..ae6d669c3b82728b5400c5ce751bdc4c42d287ae 100644
--- a/mysql-test/t/ndb_autodiscover3.test
+++ b/mysql-test/t/ndb_autodiscover3.test
@@ -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_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
 # 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;
 --connection server2
 --error ER_NO_SUCH_TABLE
@@ -60,7 +60,7 @@ reset master;
 --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT
 --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT
 # 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;
 --connection server1
 --error ER_NO_SUCH_TABLE
diff --git a/mysql-test/t/ndb_binlog_basic.test b/mysql-test/t/ndb_binlog_basic.test
index c2a36423445b60c5d1e06c4724db4b5baf796d17..e4642dc3230413f94c8f1ed752dd77bbb62179d1 100644
--- a/mysql-test/t/ndb_binlog_basic.test
+++ b/mysql-test/t/ndb_binlog_basic.test
@@ -12,14 +12,14 @@ use test;
 
 #
 # 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;
 insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
 save_master_pos;
 --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;
 alter table t1 add (b int);
@@ -38,18 +38,18 @@ drop table t2;
 # (save_master_pos waits for last gcp to complete, ensuring that we have
 #  the expected data in the binlog)
 save_master_pos;
-select inserts from mysql.binlog_index where epoch > @max_epoch and inserts > 5;
-select deletes from mysql.binlog_index where epoch > @max_epoch and deletes > 5;
+select inserts from mysql.ndb_binlog_index where epoch > @max_epoch and inserts > 5;
+select deletes from mysql.ndb_binlog_index where epoch > @max_epoch and deletes > 5;
 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;
 --sleep 1
 purge master logs before now();
-select count(*) from mysql.binlog_index;
+select count(*) from mysql.ndb_binlog_index;
 
 #
 # several tables in different databases
@@ -64,9 +64,9 @@ use test;
 insert into mysqltest.t1 values (2,1),(2,2);
 save_master_pos;
 --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 database mysqltest;
 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;
diff --git a/mysql-test/t/ndb_binlog_multi.test b/mysql-test/t/ndb_binlog_multi.test
index 1c6a1063fea4cd18a721ce53d8c663571c95c221..1f04787e27ce6c834d638da429b3df132384af54 100644
--- a/mysql-test/t/ndb_binlog_multi.test
+++ b/mysql-test/t/ndb_binlog_multi.test
@@ -38,7 +38,7 @@ INSERT INTO t2 VALUES (1,1),(2,2);
 select * from t2 order by a;
 --replace_column 1 <the_epoch>
 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`;
 
 # see if we got something on server1
@@ -50,7 +50,7 @@ DROP TABLE t2;
 --source include/show_binlog_events.inc
 --replace_result $the_epoch <the_epoch>
 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
 connection server1;
@@ -65,12 +65,12 @@ INSERT INTO t1 VALUES (1),(2);
 --source include/show_binlog_events.inc
 --replace_column 1 <the_epoch2>
 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`;
 
 --replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
 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
 connection server2;
@@ -80,4 +80,4 @@ drop table t1;
 --source include/show_binlog_events.inc
 --replace_result $the_epoch <the_epoch> $the_epoch2 <the_epoch2>
 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;
diff --git a/mysql-test/t/ndb_restore_compat.test b/mysql-test/t/ndb_restore_compat.test
index ee55e827d0ec982ab51a81da44a31025142bff0d..a95829a4354aa6565ff457a0e60ddca55ca25931 100644
--- a/mysql-test/t/ndb_restore_compat.test
+++ b/mysql-test/t/ndb_restore_compat.test
@@ -21,7 +21,7 @@ SELECT * FROM GL            ORDER BY TIME,ACCOUNT_TYPE;
 SELECT * FROM ACCOUNT       ORDER BY ACCOUNT_ID;
 SELECT COUNT(*) FROM TRANSACTION;
 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
@@ -39,5 +39,5 @@ SELECT * FROM GL            ORDER BY TIME,ACCOUNT_TYPE;
 SELECT * FROM ACCOUNT       ORDER BY ACCOUNT_ID;
 SELECT COUNT(*) FROM TRANSACTION;
 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;
diff --git a/mysql-test/t/rpl_ndb_idempotent.test b/mysql-test/t/rpl_ndb_idempotent.test
index 477e7ff02e5d0e75f2d98b179917671945542b35..f2bfe745523b0bdbd9175bc32c892289299a2d3d 100644
--- a/mysql-test/t/rpl_ndb_idempotent.test
+++ b/mysql-test/t/rpl_ndb_idempotent.test
@@ -4,7 +4,7 @@
 
 #
 # 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
@@ -15,7 +15,7 @@ SELECT * FROM t1 ORDER BY c3;
 # sync slave and retrieve epoch
 sync_slave_with_master;
 --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` ;
 SELECT * FROM t1 ORDER BY c3;
 
@@ -24,7 +24,7 @@ connection master;
 --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 ;
+   FROM mysql.ndb_binlog_index WHERE epoch = $the_epoch ;
 let $the_pos= `SELECT @the_pos` ;
 let $the_file= `SELECT @the_file` ;
 
diff --git a/mysql-test/t/rpl_ndb_multi.test b/mysql-test/t/rpl_ndb_multi.test
index 630668ad36966c6cf05483000a632206b6288b9e..196d0a5ed6f729fdfa2884468cefb46e89f9b507 100644
--- a/mysql-test/t/rpl_ndb_multi.test
+++ b/mysql-test/t/rpl_ndb_multi.test
@@ -7,7 +7,7 @@
 
 #
 # 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
@@ -25,7 +25,7 @@ SELECT * FROM t1 ORDER BY c3;
 connection master;
 sync_slave_with_master;
 --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` ;
 SELECT * FROM t1 ORDER BY c3;
 stop slave;
@@ -34,7 +34,7 @@ stop slave;
 connection server2;
 --replace_result $the_epoch <the_epoch>
 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_file= `SELECT @the_file` ;
 
diff --git a/mysql-test/t/rpl_ndb_sync.test b/mysql-test/t/rpl_ndb_sync.test
index 10f7dd534a3d649dc840338784d3d7eb387d6d08..14e2b36b588b0651e1193244513777b259a3b5cb 100644
--- a/mysql-test/t/rpl_ndb_sync.test
+++ b/mysql-test/t/rpl_ndb_sync.test
@@ -6,7 +6,7 @@
 
 #
 # 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
@@ -94,11 +94,11 @@ STOP SLAVE;
 --connection master
 reset master;
 # should now contain nothing
-select * from mysql.binlog_index;
+select * from mysql.ndb_binlog_index;
 
 --connection slave
 reset slave;
 # should now contain nothing
-select * from mysql.apply_status;
+select * from mysql.ndb_apply_status;
 
 # End 5.1 Test
diff --git a/mysql-test/t/system_mysql_db_fix.test b/mysql-test/t/system_mysql_db_fix.test
index 53bb366c642b93139dd90843a4660db7a7e5a4ee..cccf1d5767b0b9c1c022ee4f927a31e41a29df62 100644
--- a/mysql-test/t/system_mysql_db_fix.test
+++ b/mysql-test/t/system_mysql_db_fix.test
@@ -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,
 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_transition_type, general_log, slow_log, event, binlog_index;
+time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index;
 
 -- enable_query_log
 
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh
index a8e4fed5d270364c17b310b3ae2e399b1138e31e..3b9d69e259bd70bbffc2920342a92dcddefdc0d4 100644
--- a/scripts/mysql_create_system_tables.sh
+++ b/scripts/mysql_create_system_tables.sh
@@ -874,7 +874,7 @@ $c_pp
 $c_gl
 $c_sl
 $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
 
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index 15ebef7d9c0feb5fe25b05dcb836da951eb0c3db..1a52ee1d51b1fb802e049a8dc6189cd4e6fc44fa 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -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;
 
-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
 # This should not be needed, but gives us some extra testing that the above
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 0fc884f8e6870d8bb4137886ba42b58b43b0ffd0..29b4750d09b4b76cdd9e65daaee0ec6f8765ba91 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -4769,7 +4769,7 @@ int ha_ndbcluster::create(const char *name,
     schema distribution table is setup
     ( 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_tabname, NDB_SCHEMA_TABLE) == 0))
   {
@@ -4974,7 +4974,7 @@ int ha_ndbcluster::create(const char *name,
       ndb_rep_event_name(&event_name,m_dbname,m_tabname);
       int do_event_op= ndb_binlog_running;
 
-      if (!schema_share &&
+      if (!ndb_schema_share &&
           strcmp(share->db, NDB_REP_DB) == 0 &&
           strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
         do_event_op= 1;
@@ -5464,7 +5464,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
     Don't allow drop table unless
     schema distribution table is setup
   */
-  if (!schema_share)
+  if (!ndb_schema_share)
   {
     DBUG_PRINT("info", ("Schema distribution table not setup"));
     DBUG_RETURN(HA_ERR_NO_CONNECTION);
@@ -5623,7 +5623,7 @@ int ha_ndbcluster::delete_table(const char *name)
     Don't allow drop table unless
     schema distribution table is setup
   */
-  if (!schema_share)
+  if (!ndb_schema_share)
   {
     DBUG_PRINT("info", ("Schema distribution table not setup"));
     DBUG_RETURN(HA_ERR_NO_CONNECTION);
@@ -6189,7 +6189,7 @@ static void ndbcluster_drop_database(handlerton *hton, char *path)
     Don't allow drop database unless
     schema distribution table is setup
   */
-  if (!schema_share)
+  if (!ndb_schema_share)
   {
     DBUG_PRINT("info", ("Schema distribution table not setup"));
     DBUG_VOID_RETURN;
@@ -8407,7 +8407,8 @@ pthread_handler_t ndb_util_thread_func(void *arg __attribute__((unused)))
 
 #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 (!ndb_binlog_tables_inited)
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 92bc82f311444ad5d1489e2f3d8383641e0bd76d..490114bf4a9deae1c8b1442bce17da9a1a7c6d6b 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -94,8 +94,8 @@ static ulonglong ndb_latest_applied_binlog_epoch= 0;
 static ulonglong ndb_latest_handled_binlog_epoch= 0;
 static ulonglong ndb_latest_received_binlog_epoch= 0;
 
-NDB_SHARE *apply_status_share= 0;
-NDB_SHARE *schema_share= 0;
+NDB_SHARE *ndb_apply_status_share= 0;
+NDB_SHARE *ndb_schema_share= 0;
 
 /* Schema object distribution handling */
 HASH ndb_schema_objects;
@@ -116,9 +116,9 @@ static void ndb_free_schema_object(NDB_SCHEMA_OBJECT **ndb_schema_object,
 static Uint64 *p_latest_trans_gci= 0;
 
 /*
-  Global variables for holding the binlog_index table reference
+  Global variables for holding the ndb_binlog_index table reference
 */
-static TABLE *binlog_index= 0;
+static TABLE *ndb_binlog_index= 0;
 static TABLE_LIST binlog_tables;
 
 /*
@@ -215,8 +215,8 @@ static void dbug_print_table(const char *info, TABLE *table)
   Run a query through mysql_parse
 
   Used to:
-  - purging the binlog_index
-  - creating the apply_status table
+  - purging the ndb_binlog_index
+  - creating the ndb_apply_status table
 */
 static void run_query(THD *thd, char *buf, char *end,
                       my_bool print_error, my_bool disable_binlog)
@@ -254,10 +254,10 @@ static void run_query(THD *thd, char *buf, char *end,
   if (thd == injector_thd)
   {
     /*
-      running the query will close all tables, including the binlog_index
+      running the query will close all tables, including the ndb_binlog_index
       used in injector_thd
     */
-    binlog_index= 0;
+    ndb_binlog_index= 0;
   }
 }
 
@@ -363,7 +363,7 @@ void ndbcluster_binlog_init_share(NDB_SHARE *share, TABLE *_table)
   share->op= 0;
   share->table= 0;
 
-  if (!schema_share &&
+  if (!ndb_schema_share &&
       strcmp(share->db, NDB_REP_DB) == 0 &&
       strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
     do_event_op= 1;
@@ -677,18 +677,18 @@ void ndbcluster_binlog_init_handlerton()
 
 
 /*
-  check the availability af the apply_status share
+  check the availability af the ndb_apply_status share
   - return share, but do not increase refcount
   - return 0 if there is no share
 */
-static NDB_SHARE *ndbcluster_check_apply_status_share()
+static NDB_SHARE *ndbcluster_check_ndb_apply_status_share()
 {
   pthread_mutex_lock(&ndbcluster_mutex);
 
   void *share= hash_search(&ndbcluster_open_tables, 
                            NDB_APPLY_TABLE_FILE,
                            sizeof(NDB_APPLY_TABLE_FILE) - 1);
-  DBUG_PRINT("info",("ndbcluster_check_apply_status_share %s 0x%lx",
+  DBUG_PRINT("info",("ndbcluster_check_ndb_apply_status_share %s 0x%lx",
                      NDB_APPLY_TABLE_FILE, (long) share));
   pthread_mutex_unlock(&ndbcluster_mutex);
   return (NDB_SHARE*) share;
@@ -699,25 +699,25 @@ static NDB_SHARE *ndbcluster_check_apply_status_share()
   - return share, but do not increase refcount
   - return 0 if there is no share
 */
-static NDB_SHARE *ndbcluster_check_schema_share()
+static NDB_SHARE *ndbcluster_check_ndb_schema_share()
 {
   pthread_mutex_lock(&ndbcluster_mutex);
 
   void *share= hash_search(&ndbcluster_open_tables, 
                            NDB_SCHEMA_TABLE_FILE,
                            sizeof(NDB_SCHEMA_TABLE_FILE) - 1);
-  DBUG_PRINT("info",("ndbcluster_check_schema_share %s 0x%lx",
+  DBUG_PRINT("info",("ndbcluster_check_ndb_schema_share %s 0x%lx",
                      NDB_SCHEMA_TABLE_FILE, (long) share));
   pthread_mutex_unlock(&ndbcluster_mutex);
   return (NDB_SHARE*) share;
 }
 
 /*
-  Create the apply_status table
+  Create the ndb_apply_status table
 */
-static int ndbcluster_create_apply_status_table(THD *thd)
+static int ndbcluster_create_ndb_apply_status_table(THD *thd)
 {
-  DBUG_ENTER("ndbcluster_create_apply_status_table");
+  DBUG_ENTER("ndbcluster_create_ndb_apply_status_table");
 
   /*
     Check if we already have the apply status table.
@@ -725,7 +725,7 @@ static int ndbcluster_create_apply_status_table(THD *thd)
     and thus have a share
   */
 
-  if (ndbcluster_check_apply_status_share())
+  if (ndbcluster_check_ndb_apply_status_share())
     DBUG_RETURN(0);
 
   if (g_ndb_cluster_connection->get_no_ready() <= 0)
@@ -774,7 +774,7 @@ static int ndbcluster_create_schema_table(THD *thd)
     and thus have a share
   */
 
-  if (ndbcluster_check_schema_share())
+  if (ndbcluster_check_ndb_schema_share())
     DBUG_RETURN(0);
 
   if (g_ndb_cluster_connection->get_no_ready() <= 0)
@@ -818,30 +818,30 @@ static int ndbcluster_create_schema_table(THD *thd)
 
 int ndbcluster_setup_binlog_table_shares(THD *thd)
 {
-  if (!schema_share &&
-      ndbcluster_check_schema_share() == 0)
+  if (!ndb_schema_share &&
+      ndbcluster_check_ndb_schema_share() == 0)
   {
     pthread_mutex_lock(&LOCK_open);
     ndb_create_table_from_engine(thd, NDB_REP_DB, NDB_SCHEMA_TABLE);
     pthread_mutex_unlock(&LOCK_open);
-    if (!schema_share)
+    if (!ndb_schema_share)
     {
       ndbcluster_create_schema_table(thd);
       // always make sure we create the 'schema' first
-      if (!schema_share)
+      if (!ndb_schema_share)
         return 1;
     }
   }
-  if (!apply_status_share &&
-      ndbcluster_check_apply_status_share() == 0)
+  if (!ndb_apply_status_share &&
+      ndbcluster_check_ndb_apply_status_share() == 0)
   {
     pthread_mutex_lock(&LOCK_open);
     ndb_create_table_from_engine(thd, NDB_REP_DB, NDB_APPLY_TABLE);
     pthread_mutex_unlock(&LOCK_open);
-    if (!apply_status_share)
+    if (!ndb_apply_status_share)
     {
-      ndbcluster_create_apply_status_table(thd);
-      if (!apply_status_share)
+      ndbcluster_create_ndb_apply_status_table(thd);
+      if (!ndb_apply_status_share)
         return 1;
     }
   }
@@ -1003,7 +1003,7 @@ ndbcluster_update_slock(THD *thd,
                         const char *table_name)
 {
   DBUG_ENTER("ndbcluster_update_slock");
-  if (!schema_share)
+  if (!ndb_schema_share)
   {
     DBUG_RETURN(0);
   }
@@ -1194,7 +1194,7 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
   DBUG_PRINT("enter",
              ("query: %s  db: %s  table_name: %s  thd_ndb->options: %d",
               query, db, table_name, thd_ndb->options));
-  if (!schema_share || thd_ndb->options & TNO_NO_LOG_SCHEMA_OP)
+  if (!ndb_schema_share || thd_ndb->options & TNO_NO_LOG_SCHEMA_OP)
   {
     DBUG_RETURN(0);
   }
@@ -1268,10 +1268,10 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
     int no_storage_nodes= g_ndb_cluster_connection->no_db_nodes();
     bitmap_init(&schema_subscribers, bitbuf, sizeof(bitbuf)*8, FALSE);
     bitmap_set_all(&schema_subscribers);
-    (void) pthread_mutex_lock(&schema_share->mutex);
+    (void) pthread_mutex_lock(&ndb_schema_share->mutex);
     for (i= 0; i < no_storage_nodes; i++)
     {
-      MY_BITMAP *table_subscribers= &schema_share->subscriber_bitmap[i];
+      MY_BITMAP *table_subscribers= &ndb_schema_share->subscriber_bitmap[i];
       if (!bitmap_is_clear_all(table_subscribers))
       {
         bitmap_intersect(&schema_subscribers,
@@ -1279,7 +1279,7 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
         updated= 1;
       }
     }
-    (void) pthread_mutex_unlock(&schema_share->mutex);
+    (void) pthread_mutex_unlock(&ndb_schema_share->mutex);
     if (updated)
     {
       bitmap_clear_bit(&schema_subscribers, node_id);
@@ -1475,15 +1475,15 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
                                       &abstime);
       if (thd->killed)
         break;
-      (void) pthread_mutex_lock(&schema_share->mutex);
+      (void) pthread_mutex_lock(&ndb_schema_share->mutex);
       for (i= 0; i < no_storage_nodes; i++)
       {
         /* remove any unsubscribed from schema_subscribers */
-        MY_BITMAP *tmp= &schema_share->subscriber_bitmap[i];
+        MY_BITMAP *tmp= &ndb_schema_share->subscriber_bitmap[i];
         if (!bitmap_is_clear_all(tmp))
           bitmap_intersect(&schema_subscribers, tmp);
       }
-      (void) pthread_mutex_unlock(&schema_share->mutex);
+      (void) pthread_mutex_unlock(&ndb_schema_share->mutex);
 
       /* remove any unsubscribed from ndb_schema_object->slock */
       bitmap_intersect(&ndb_schema_object->slock_bitmap, &schema_subscribers);
@@ -1733,7 +1733,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
 {
   DBUG_ENTER("ndb_binlog_thread_handle_schema_event");
   NDB_SHARE *tmp_share= (NDB_SHARE *)pOp->getCustomData();
-  if (tmp_share && schema_share == tmp_share)
+  if (tmp_share && ndb_schema_share == tmp_share)
   {
     NDBEVENT::TableEvent ev_type= pOp->getEventType();
     DBUG_PRINT("enter", ("%s.%s  ev_type: %d",
@@ -1900,15 +1900,15 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
     case NDBEVENT::TE_CLUSTER_FAILURE:
       if (ndb_extra_logging)
         sql_print_information("NDB Binlog: cluster failure for %s at epoch %u.",
-                              schema_share->key, (unsigned) pOp->getGCI());
+                              ndb_schema_share->key, (unsigned) pOp->getGCI());
       // fall through
     case NDBEVENT::TE_DROP:
       if (ndb_extra_logging &&
           ndb_binlog_tables_inited && ndb_binlog_running)
         sql_print_information("NDB Binlog: ndb tables initially "
                               "read only on reconnect.");
-      free_share(&schema_share);
-      schema_share= 0;
+      free_share(&ndb_schema_share);
+      ndb_schema_share= 0;
       close_cached_tables((THD*) 0, 0, (TABLE_LIST*) 0, FALSE);
       // fall through
     case NDBEVENT::TE_ALTER:
@@ -2134,15 +2134,15 @@ ndb_binlog_thread_handle_schema_event_post_epoch(THD *thd,
 
 /*********************************************************************
   Internal helper functions for handeling of the cluster replication tables
-  - binlog_index
-  - apply_status
+  - ndb_binlog_index
+  - ndb_apply_status
 *********************************************************************/
 
 /*
   struct to hold the data to be inserted into the
-  binlog_index table
+  ndb_binlog_index table
 */
-struct Binlog_index_row {
+struct ndb_binlog_index_row {
   ulonglong gci;
   const char *master_log_file;
   ulonglong master_log_pos;
@@ -2153,10 +2153,10 @@ struct Binlog_index_row {
 };
 
 /*
-  Open the binlog_index table
+  Open the ndb_binlog_index table
 */
-static int open_binlog_index(THD *thd, TABLE_LIST *tables,
-                             TABLE **binlog_index)
+static int open_ndb_binlog_index(THD *thd, TABLE_LIST *tables,
+                             TABLE **ndb_binlog_index)
 {
   static char repdb[]= NDB_REP_DB;
   static char reptable[]= NDB_REP_TABLE;
@@ -2172,26 +2172,26 @@ static int open_binlog_index(THD *thd, TABLE_LIST *tables,
   thd->clear_error();
   if (open_tables(thd, &tables, &counter, MYSQL_LOCK_IGNORE_FLUSH))
   {
-    sql_print_error("NDB Binlog: Opening binlog_index: %d, '%s'",
+    sql_print_error("NDB Binlog: Opening ndb_binlog_index: %d, '%s'",
                     thd->net.last_errno,
                     thd->net.last_error ? thd->net.last_error : "");
     thd->proc_info= save_proc_info;
     return -1;
   }
-  *binlog_index= tables->table;
+  *ndb_binlog_index= tables->table;
   thd->proc_info= save_proc_info;
-  (*binlog_index)->use_all_columns();
+  (*ndb_binlog_index)->use_all_columns();
   return 0;
 }
 
 
 /*
-  Insert one row in the binlog_index
+  Insert one row in the ndb_binlog_index
 */
 
-int ndb_add_binlog_index(THD *thd, void *_row)
+int ndb_add_ndb_binlog_index(THD *thd, void *_row)
 {
-  Binlog_index_row &row= *(Binlog_index_row *) _row;
+  ndb_binlog_index_row &row= *(ndb_binlog_index_row *) _row;
   int error= 0;
   bool need_reopen;
   /*
@@ -2203,10 +2203,10 @@ int ndb_add_binlog_index(THD *thd, void *_row)
 
   for ( ; ; ) /* loop for need_reopen */
   {
-    if (!binlog_index && open_binlog_index(thd, &binlog_tables, &binlog_index))
+    if (!ndb_binlog_index && open_ndb_binlog_index(thd, &binlog_tables, &ndb_binlog_index))
     {
       error= -1;
-      goto add_binlog_index_err;
+      goto add_ndb_binlog_index_err;
     }
 
     if (lock_tables(thd, &binlog_tables, 1, &need_reopen))
@@ -2215,43 +2215,43 @@ int ndb_add_binlog_index(THD *thd, void *_row)
       {
         TABLE_LIST *p_binlog_tables= &binlog_tables;
         close_tables_for_reopen(thd, &p_binlog_tables);
-	binlog_index= 0;
+	ndb_binlog_index= 0;
         continue;
       }
-      sql_print_error("NDB Binlog: Unable to lock table binlog_index");
+      sql_print_error("NDB Binlog: Unable to lock table ndb_binlog_index");
       error= -1;
-      goto add_binlog_index_err;
+      goto add_ndb_binlog_index_err;
     }
     break;
   }
 
   // Set all fields non-null.
-  if(binlog_index->s->null_bytes > 0)
-    bzero(binlog_index->record[0], binlog_index->s->null_bytes);
-  binlog_index->field[0]->store(row.master_log_pos);
-  binlog_index->field[1]->store(row.master_log_file,
+  if(ndb_binlog_index->s->null_bytes > 0)
+    bzero(ndb_binlog_index->record[0], ndb_binlog_index->s->null_bytes);
+  ndb_binlog_index->field[0]->store(row.master_log_pos);
+  ndb_binlog_index->field[1]->store(row.master_log_file,
                                 strlen(row.master_log_file),
                                 &my_charset_bin);
-  binlog_index->field[2]->store(row.gci);
-  binlog_index->field[3]->store(row.n_inserts);
-  binlog_index->field[4]->store(row.n_updates);
-  binlog_index->field[5]->store(row.n_deletes);
-  binlog_index->field[6]->store(row.n_schemaops);
+  ndb_binlog_index->field[2]->store(row.gci);
+  ndb_binlog_index->field[3]->store(row.n_inserts);
+  ndb_binlog_index->field[4]->store(row.n_updates);
+  ndb_binlog_index->field[5]->store(row.n_deletes);
+  ndb_binlog_index->field[6]->store(row.n_schemaops);
 
-  if ((error= binlog_index->file->ha_write_row(binlog_index->record[0])))
+  if ((error= ndb_binlog_index->file->ha_write_row(ndb_binlog_index->record[0])))
   {
-    sql_print_error("NDB Binlog: Writing row to binlog_index: %d", error);
+    sql_print_error("NDB Binlog: Writing row to ndb_binlog_index: %d", error);
     error= -1;
-    goto add_binlog_index_err;
+    goto add_ndb_binlog_index_err;
   }
 
   mysql_unlock_tables(thd, thd->lock);
   thd->lock= 0;
   thd->options= saved_options;
   return 0;
-add_binlog_index_err:
+add_ndb_binlog_index_err:
   close_thread_tables(thd);
-  binlog_index= 0;
+  ndb_binlog_index= 0;
   thd->options= saved_options;
   return error;
 }
@@ -2428,7 +2428,7 @@ int ndbcluster_create_binlog_setup(Ndb *ndb, const char *key,
                     "allocating table share for %s failed", key);
   }
 
-  if (!schema_share &&
+  if (!ndb_schema_share &&
       strcmp(share->db, NDB_REP_DB) == 0 &&
       strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
     do_event_op= 1;
@@ -2559,7 +2559,7 @@ ndbcluster_create_event(Ndb *ndb, const NDBTAB *ndbtab,
   }
   else
   {
-    if (schema_share || strcmp(share->db, NDB_REP_DB) ||
+    if (ndb_schema_share || strcmp(share->db, NDB_REP_DB) ||
         strcmp(share->table_name, NDB_SCHEMA_TABLE))
     {
       my_event.setReport(NDBEVENT::ER_UPDATED);
@@ -2696,13 +2696,13 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
     DBUG_RETURN(0);
   }
 
-  int do_schema_share= 0, do_apply_status_share= 0;
-  if (!schema_share && strcmp(share->db, NDB_REP_DB) == 0 &&
+  int do_ndb_schema_share= 0, do_ndb_apply_status_share= 0;
+  if (!ndb_schema_share && strcmp(share->db, NDB_REP_DB) == 0 &&
       strcmp(share->table_name, NDB_SCHEMA_TABLE) == 0)
-    do_schema_share= 1;
-  else if (!apply_status_share && strcmp(share->db, NDB_REP_DB) == 0 &&
+    do_ndb_schema_share= 1;
+  else if (!ndb_apply_status_share && strcmp(share->db, NDB_REP_DB) == 0 &&
            strcmp(share->table_name, NDB_APPLY_TABLE) == 0)
-    do_apply_status_share= 1;
+    do_ndb_apply_status_share= 1;
   else if (!binlog_filter->db_ok(share->db))
   {
     share->flags|= NSF_NO_BINLOG;
@@ -2726,7 +2726,7 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
   {
     pthread_mutex_lock(&injector_mutex);
     Ndb *ndb= injector_ndb;
-    if (do_schema_share)
+    if (do_ndb_schema_share)
       ndb= schema_ndb;
 
     if (ndb == 0)
@@ -2736,7 +2736,7 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
     }
 
     NdbEventOperation* op;
-    if (do_schema_share)
+    if (do_ndb_schema_share)
       op= ndb->createEventOperation(event_name);
     else
     {
@@ -2858,14 +2858,14 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
   }
 
   get_share(share);
-  if (do_apply_status_share)
+  if (do_ndb_apply_status_share)
   {
-    apply_status_share= get_share(share);
+    ndb_apply_status_share= get_share(share);
     (void) pthread_cond_signal(&injector_cond);
   }
-  else if (do_schema_share)
+  else if (do_ndb_schema_share)
   {
-    schema_share= get_share(share);
+    ndb_schema_share= get_share(share);
     (void) pthread_cond_signal(&injector_cond);
   }
 
@@ -2988,7 +2988,7 @@ ndbcluster_handle_drop_table(Ndb *ndb, const char *event_name,
   Handle error states on events from the storage nodes
 */
 static int ndb_binlog_thread_handle_error(Ndb *ndb, NdbEventOperation *pOp,
-                                          Binlog_index_row &row)
+                                          ndb_binlog_index_row &row)
 {
   NDB_SHARE *share= (NDB_SHARE *)pOp->getCustomData();
   DBUG_ENTER("ndb_binlog_thread_handle_error");
@@ -2997,7 +2997,7 @@ static int ndb_binlog_thread_handle_error(Ndb *ndb, NdbEventOperation *pOp,
   if (overrun)
   {
     /*
-      ToDo: this error should rather clear the binlog_index...
+      ToDo: this error should rather clear the ndb_binlog_index...
       and continue
     */
     sql_print_error("NDB Binlog: Overrun in event buffer, "
@@ -3010,7 +3010,7 @@ static int ndb_binlog_thread_handle_error(Ndb *ndb, NdbEventOperation *pOp,
   if (!pOp->isConsistent())
   {
     /*
-      ToDo: this error should rather clear the binlog_index...
+      ToDo: this error should rather clear the ndb_binlog_index...
       and continue
     */
     sql_print_error("NDB Binlog: Not Consistent. Cannot "
@@ -3030,7 +3030,7 @@ static int ndb_binlog_thread_handle_error(Ndb *ndb, NdbEventOperation *pOp,
 static int
 ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
                                         NdbEventOperation *pOp,
-                                        Binlog_index_row &row)
+                                        ndb_binlog_index_row &row)
 {
   NDB_SHARE *share= (NDB_SHARE *)pOp->getCustomData();
   NDBEVENT::TableEvent type= pOp->getEventType();
@@ -3046,14 +3046,14 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
     if (ndb_extra_logging)
       sql_print_information("NDB Binlog: cluster failure for %s at epoch %u.",
                             share->key, (unsigned) pOp->getGCI());
-    if (apply_status_share == share)
+    if (ndb_apply_status_share == share)
     {
       if (ndb_extra_logging &&
           ndb_binlog_tables_inited && ndb_binlog_running)
         sql_print_information("NDB Binlog: ndb tables initially "
                               "read only on reconnect.");
-      free_share(&apply_status_share);
-      apply_status_share= 0;
+      free_share(&ndb_apply_status_share);
+      ndb_apply_status_share= 0;
     }
     DBUG_PRINT("error", ("CLUSTER FAILURE EVENT: "
                         "%s  received share: 0x%lx  op: 0x%lx  share op: 0x%lx  "
@@ -3062,14 +3062,14 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
                          (long) share->op, (long) share->op_old));
     break;
   case NDBEVENT::TE_DROP:
-    if (apply_status_share == share)
+    if (ndb_apply_status_share == share)
     {
       if (ndb_extra_logging &&
           ndb_binlog_tables_inited && ndb_binlog_running)
         sql_print_information("NDB Binlog: ndb tables initially "
                               "read only on reconnect.");
-      free_share(&apply_status_share);
-      apply_status_share= 0;
+      free_share(&ndb_apply_status_share);
+      ndb_apply_status_share= 0;
     }
     /* ToDo: remove printout */
     if (ndb_extra_logging)
@@ -3105,11 +3105,11 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
 */
 static int
 ndb_binlog_thread_handle_data_event(Ndb *ndb, NdbEventOperation *pOp,
-                                    Binlog_index_row &row,
+                                    ndb_binlog_index_row &row,
                                     injector::transaction &trans)
 {
   NDB_SHARE *share= (NDB_SHARE*) pOp->getCustomData();
-  if (share == apply_status_share)
+  if (share == ndb_apply_status_share)
     return 0;
   TABLE *table= share->table;
 
@@ -3380,7 +3380,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
   Ndb *i_ndb= 0;
   Ndb *s_ndb= 0;
   Thd_ndb *thd_ndb=0;
-  int ndb_update_binlog_index= 1;
+  int ndb_update_ndb_binlog_index= 1;
   injector *inj= injector::instance();
 
 #ifdef RUN_NDB_BINLOG_TIMER
@@ -3502,8 +3502,8 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
     thd->proc_info= "Waiting for ndbcluster to start";
 
     pthread_mutex_lock(&injector_mutex);
-    while (!schema_share ||
-           (ndb_binlog_running && !apply_status_share))
+    while (!ndb_schema_share ||
+           (ndb_binlog_running && !ndb_apply_status_share))
     {
       /* ndb not connected yet */
       struct timespec abstime;
@@ -3591,7 +3591,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
     static char db[]= "";
     thd->db= db;
     if (ndb_binlog_running)
-      open_binlog_index(thd, &binlog_tables, &binlog_index);
+      open_ndb_binlog_index(thd, &binlog_tables, &ndb_binlog_index);
     thd->db= db;
   }
   do_ndbcluster_binlog_close_connection= BCCC_running;
@@ -3647,12 +3647,12 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
          !ndb_binlog_running))
       break; /* Shutting down server */
 
-    if (binlog_index && binlog_index->s->version < refresh_version)
+    if (ndb_binlog_index && ndb_binlog_index->s->version < refresh_version)
     {
-      if (binlog_index->s->version < refresh_version)
+      if (ndb_binlog_index->s->version < refresh_version)
       {
         close_thread_tables(thd);
-        binlog_index= 0;
+        ndb_binlog_index= 0;
       }
     }
 
@@ -3716,7 +3716,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
       DBUG_PRINT("info", ("pollEvents res: %d", res));
       thd->proc_info= "Processing events";
       NdbEventOperation *pOp= i_ndb->nextEvent();
-      Binlog_index_row row;
+      ndb_binlog_index_row row;
       while (pOp != NULL)
       {
 #ifdef RUN_NDB_BINLOG_TIMER
@@ -3763,7 +3763,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
                                   gci_op->getEvent()->getTable()->getName()));
               continue;
             }
-            if (share == apply_status_share)
+            if (share == ndb_apply_status_share)
             {
               // skip this table, it is handled specially
               continue;
@@ -3792,9 +3792,9 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
         }
         if (trans.good())
         {
-          if (apply_status_share)
+          if (ndb_apply_status_share)
           {
-            TABLE *table= apply_status_share->table;
+            TABLE *table= ndb_apply_status_share->table;
 
             const LEX_STRING& name=table->s->table_name;
             DBUG_PRINT("info", ("use_table: %.*s", name.length, name.str));
@@ -3920,8 +3920,8 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
           row.master_log_pos= start.file_pos();
 
           DBUG_PRINT("info", ("COMMIT gci: %lu", (ulong) gci));
-          if (ndb_update_binlog_index)
-            ndb_add_binlog_index(thd, &row);
+          if (ndb_update_ndb_binlog_index)
+            ndb_add_ndb_binlog_index(thd, &row);
           ndb_latest_applied_binlog_epoch= gci;
         }
         ndb_latest_handled_binlog_epoch= gci;
@@ -3949,7 +3949,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
   {
     ndb_binlog_tables_inited= FALSE;
     close_thread_tables(thd);
-    binlog_index= 0;
+    ndb_binlog_index= 0;
     goto restart;
   }
 err:
@@ -3992,15 +3992,15 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
 			  10*sleep_cnt, g_ndb_cluster_connection->get_active_ndb_objects(), 
 			  ndb_obj_cnt);
   
-  if (apply_status_share)
+  if (ndb_apply_status_share)
   {
-    free_share(&apply_status_share);
-    apply_status_share= 0;
+    free_share(&ndb_apply_status_share);
+    ndb_apply_status_share= 0;
   }
-  if (schema_share)
+  if (ndb_schema_share)
   {
-    free_share(&schema_share);
-    schema_share= 0;
+    free_share(&ndb_schema_share);
+    ndb_schema_share= 0;
   }
 
   /* remove all event operations */
diff --git a/sql/ha_ndbcluster_binlog.h b/sql/ha_ndbcluster_binlog.h
index 5cf3cedf03b9c0b602227943e6e864708483b6e4..18b94bb8f2ad03a6e616732f2b9bd3d10441d223 100644
--- a/sql/ha_ndbcluster_binlog.h
+++ b/sql/ha_ndbcluster_binlog.h
@@ -157,11 +157,11 @@ int ndbcluster_binlog_start();
 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);
-extern NDB_SHARE *apply_status_share;
-extern NDB_SHARE *schema_share;
+extern NDB_SHARE *ndb_apply_status_share;
+extern NDB_SHARE *ndb_schema_share;
 
 extern THD *injector_thd;
 extern my_bool ndb_binlog_running;
diff --git a/sql/ha_ndbcluster_tables.h b/sql/ha_ndbcluster_tables.h
index 9d7fda331027c28581d4b1c0ca15640e20987d1e..2b1bdbc2b8909be30a4c5504018467be59fa4b4c 100644
--- a/sql/ha_ndbcluster_tables.h
+++ b/sql/ha_ndbcluster_tables.h
@@ -16,6 +16,7 @@
 */
 
 #define NDB_REP_DB      "mysql"
-#define NDB_REP_TABLE   "binlog_index"
-#define NDB_APPLY_TABLE "apply_status"
-#define NDB_SCHEMA_TABLE "schema"
+#define NDB_REP_TABLE   "ndb_binlog_index"
+#define NDB_APPLY_TABLE "ndb_apply_status"
+#define OLD_NDB_APPLY_TABLE "apply_status"
+#define NDB_SCHEMA_TABLE "ndb_schema"
diff --git a/storage/ndb/tools/restore/Restore.cpp b/storage/ndb/tools/restore/Restore.cpp
index b51760266cb5c365e6790448f84518e1e29ed13f..ebda5fc962246ac1810c45e596f505938b6cbc76 100644
--- a/storage/ndb/tools/restore/Restore.cpp
+++ b/storage/ndb/tools/restore/Restore.cpp
@@ -305,8 +305,8 @@ RestoreMetaData::markSysTables()
            before we changed the database name of the tables from
            "cluster_replication" -> "cluster" -> "mysql"
         */
-        strcmp(tableName, "cluster_replication/def/" NDB_APPLY_TABLE) == 0 ||
-        strcmp(tableName, "cluster/def/" NDB_APPLY_TABLE) == 0 ||
+        strcmp(tableName, "cluster_replication/def/" OLD_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_SCHEMA_TABLE)== 0 )
       table->isSysTable = true;