Below is the list of changes that have just been committed into a local
5.1 repository of marty. When marty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-12-01 15:49:07+01:00, mskold@stripped +34 -0
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/include/ndb_setup_slave.inc@stripped, 2006-12-01 15:48:21+01:00, mskold@stripped
+3 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/lib/init_db.sql@stripped, 2006-12-01 15:48:22+01:00, mskold@stripped +1 -1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/mysql-test-run.pl@stripped, 2006-12-01 15:48:20+01:00, mskold@stripped +4 -4
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/1st.result@stripped, 2006-12-01 15:48:22+01:00, mskold@stripped +1 -1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/connect.result@stripped, 2006-12-01 15:48:22+01:00, mskold@stripped +3 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/information_schema.result@stripped, 2006-12-01 15:48:22+01:00,
mskold@stripped +2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/log_tables.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +1 -1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/mysqlcheck.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/ndb_binlog_basic.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +7
-7
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/ndb_binlog_ddl_multi.result@stripped, 2006-12-01 15:48:23+01:00,
mskold@stripped +3 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/ndb_binlog_multi.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +9
-9
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/ndb_restore_compat.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped
+2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/rpl_ndb_dd_basic.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +1
-1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/rpl_ndb_idempotent.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped
+2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/rpl_ndb_log.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +12
-12
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/rpl_ndb_multi.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/rpl_truncate_7ndb.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped
+26 -26
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/r/system_mysql_db.result@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +1
-1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/information_schema.test@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped
+2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/ndb_autodiscover3.test@stripped, 2006-12-01 15:48:23+01:00, mskold@stripped +2
-2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/ndb_binlog_basic.test@stripped, 2006-12-01 15:48:24+01:00, mskold@stripped +9
-9
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/ndb_binlog_multi.test@stripped, 2006-12-01 15:48:24+01:00, mskold@stripped +5
-5
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/ndb_restore_compat.test@stripped, 2006-12-01 15:48:24+01:00, mskold@stripped +2
-2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/rpl_ndb_idempotent.test@stripped, 2006-12-01 15:48:24+01:00, mskold@stripped +3
-3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/rpl_ndb_multi.test@stripped, 2006-12-01 15:48:24+01:00, mskold@stripped +3 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/rpl_ndb_sync.test@stripped, 2006-12-01 15:48:24+01:00, mskold@stripped +3 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
mysql-test/t/system_mysql_db_fix.test@stripped, 2006-12-01 15:48:25+01:00, mskold@stripped
+1 -1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
scripts/mysql_create_system_tables.sh@stripped, 2006-12-01 15:48:25+01:00, mskold@stripped
+1 -1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
scripts/mysql_fix_privilege_tables.sql@stripped, 2006-12-01 15:48:25+01:00, mskold@stripped
+1 -1
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
sql/ha_ndbcluster.cc@stripped, 2006-12-01 15:48:25+01:00, mskold@stripped +7 -6
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
sql/ha_ndbcluster_binlog.cc@stripped, 2006-12-01 15:48:25+01:00, mskold@stripped +117 -117
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
sql/ha_ndbcluster_binlog.h@stripped, 2006-12-01 15:48:25+01:00, mskold@stripped +3 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
sql/ha_ndbcluster_tables.h@stripped, 2006-12-01 15:48:28+01:00, mskold@stripped +4 -3
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
storage/ndb/tools/restore/Restore.cpp@stripped, 2006-12-01 15:48:28+01:00, mskold@stripped
+2 -2
Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to
mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mskold
# Host: linux.site
# Root: /windows/Linux_space/MySQL/mysql-5.1-new-ndb
--- 1.14/mysql-test/r/log_tables.result 2006-12-01 15:49:40 +01:00
+++ 1.15/mysql-test/r/log_tables.result 2006-12-01 15:49:40 +01:00
@@ -280,9 +280,9 @@ create table general_log_new like genera
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;
--- 1.140/mysql-test/r/information_schema.result 2006-12-01 15:49:40 +01:00
+++ 1.141/mysql-test/r/information_schema.result 2006-12-01 15:49:40 +01:00
@@ -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
--- 1.89/mysql-test/t/information_schema.test 2006-12-01 15:49:40 +01:00
+++ 1.90/mysql-test/t/information_schema.test 2006-12-01 15:49:40 +01:00
@@ -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;
#
--- 1.11/mysql-test/r/mysqlcheck.result 2006-12-01 15:49:40 +01:00
+++ 1.12/mysql-test/r/mysqlcheck.result 2006-12-01 15:49:40 +01:00
@@ -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
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
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
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
--- 1.15/mysql-test/r/rpl_ndb_log.result 2006-12-01 15:49:40 +01:00
+++ 1.16/mysql-test/r/rpl_ndb_log.result 2006-12-01 15:49:40 +01:00
@@ -22,7 +22,7 @@ master-bin.000001 # Format_desc 1 # Serv
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`
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 # Serv
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`
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`
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 # Serve
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`;
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 # Serve
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;
--- 1.28/mysql-test/lib/init_db.sql 2006-12-01 15:49:42 +01:00
+++ 1.29/mysql-test/lib/init_db.sql 2006-12-01 15:49:42 +01:00
@@ -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;
--- 1.238/mysql-test/mysql-test-run.pl 2006-12-01 15:49:42 +01:00
+++ 1.239/mysql-test/mysql-test-run.pl 2006-12-01 15:49:42 +01:00
@@ -2456,8 +2456,8 @@ sub ndbcluster_start ($$) {
sub rm_ndbcluster_tables ($) {
my $dir= shift;
- foreach my $bin ( glob("$dir/mysql/apply_status*"),
- glob("$dir/mysql/schema*"))
+ foreach my $bin ( glob("$dir/mysql/ndb_apply_status*"),
+ glob("$dir/mysql/ndb_schema*"))
{
unlink($bin);
}
@@ -4127,12 +4127,12 @@ sub run_testcase_start_servers($) {
# tables ok FIXME This is a workaround so that only one mysqld
# create the tables
if ( ! sleep_until_file_created(
- "$master->[0]->{'path_myddir'}/mysql/apply_status.ndb",
+ "$master->[0]->{'path_myddir'}/mysql/ndb_apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{
- $tinfo->{'comment'}= "Failed to create 'mysql/apply_status' table";
+ $tinfo->{'comment'}= "Failed to create 'mysql/ndb_apply_status' table";
return 1;
}
}
--- 1.42/storage/ndb/tools/restore/Restore.cpp 2006-12-01 15:49:42 +01:00
+++ 1.43/storage/ndb/tools/restore/Restore.cpp 2006-12-01 15:49:42 +01:00
@@ -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;
--- 1.369/sql/ha_ndbcluster.cc 2006-12-01 15:49:42 +01:00
+++ 1.370/sql/ha_ndbcluster.cc 2006-12-01 15:49:42 +01:00
@@ -4769,7 +4769,7 @@ int ha_ndbcluster::create(const char *na
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 *na
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_ndbcluste
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 ch
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(han
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(v
#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)
--- 1.4/mysql-test/r/rpl_truncate_7ndb.result 2006-12-01 15:49:42 +01:00
+++ 1.5/mysql-test/r/rpl_truncate_7ndb.result 2006-12-01 15:49:42 +01:00
@@ -33,12 +33,12 @@ master-bin.000001 4 Format_desc 1 102 Se
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 Se
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
--- 1.1/mysql-test/r/1st.result 2006-12-01 15:49:42 +01:00
+++ 1.2/mysql-test/r/1st.result 2006-12-01 15:49:42 +01:00
@@ -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
--- 1.46/scripts/mysql_fix_privilege_tables.sql 2006-12-01 15:49:42 +01:00
+++ 1.47/scripts/mysql_fix_privilege_tables.sql 2006-12-01 15:49:42 +01:00
@@ -687,7 +687,7 @@ ALTER TABLE tables_priv MODIFY Table_pri
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
--- 1.25/mysql-test/r/connect.result 2006-12-01 15:49:42 +01:00
+++ 1.26/mysql-test/r/connect.result 2006-12-01 15:49:42 +01:00
@@ -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 ident
grant ALL on *.* to test@stripped 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 4
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
--- 1.2/mysql-test/include/ndb_setup_slave.inc 2006-12-01 15:49:42 +01:00
+++ 1.3/mysql-test/include/ndb_setup_slave.inc 2006-12-01 15:49:42 +01:00
@@ -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
--replace_result $the_epoch <the_epoch>
--replace_column 1 <the_pos>
eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
- FROM mysql.binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
+ FROM mysql.ndb_binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1;
--let $the_pos= `SELECT @the_pos`
--let $the_file= `SELECT @the_file`
--- 1.4/mysql-test/r/ndb_binlog_basic.result 2006-12-01 15:49:42 +01:00
+++ 1.5/mysql-test/r/ndb_binlog_basic.result 2006-12-01 15:49:42 +01:00
@@ -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
--- 1.15/mysql-test/r/ndb_binlog_ddl_multi.result 2006-12-01 15:49:43 +01:00
+++ 1.16/mysql-test/r/ndb_binlog_ddl_multi.result 2006-12-01 15:49:43 +01:00
@@ -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_lo
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
--- 1.6/mysql-test/r/ndb_binlog_multi.result 2006-12-01 15:49:43 +01:00
+++ 1.7/mysql-test/r/ndb_binlog_multi.result 2006-12-01 15:49:43 +01:00
@@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_lo
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_lo
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_lo
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_lo
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
--- 1.2/mysql-test/r/ndb_restore_compat.result 2006-12-01 15:49:43 +01:00
+++ 1.3/mysql-test/r/ndb_restore_compat.result 2006-12-01 15:49:43 +01:00
@@ -44,7 +44,7 @@ SELECT * FROM SYSTEM_VALUES ORDER BY SYS
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 SYS
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;
--- 1.8/mysql-test/r/rpl_ndb_dd_basic.result 2006-12-01 15:49:43 +01:00
+++ 1.9/mysql-test/r/rpl_ndb_dd_basic.result 2006-12-01 15:49:43 +01:00
@@ -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
--- 1.4/mysql-test/r/rpl_ndb_idempotent.result 2006-12-01 15:49:43 +01:00
+++ 1.5/mysql-test/r/rpl_ndb_idempotent.result 2006-12-01 15:49:43 +01:00
@@ -9,14 +9,14 @@ INSERT INTO t1 VALUES ("row1","will go a
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);
--- 1.3/mysql-test/r/rpl_ndb_multi.result 2006-12-01 15:49:43 +01:00
+++ 1.4/mysql-test/r/rpl_ndb_multi.result 2006-12-01 15:49:43 +01:00
@@ -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
--- 1.9/mysql-test/t/ndb_autodiscover3.test 2006-12-01 15:49:43 +01:00
+++ 1.10/mysql-test/t/ndb_autodiscover3.test 2006-12-01 15:49:43 +01:00
@@ -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
--- 1.4/mysql-test/t/ndb_binlog_basic.test 2006-12-01 15:49:43 +01:00
+++ 1.5/mysql-test/t/ndb_binlog_basic.test 2006-12-01 15:49:43 +01:00
@@ -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;
--- 1.6/mysql-test/t/ndb_binlog_multi.test 2006-12-01 15:49:43 +01:00
+++ 1.7/mysql-test/t/ndb_binlog_multi.test 2006-12-01 15:49:43 +01:00
@@ -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;
--- 1.2/mysql-test/t/ndb_restore_compat.test 2006-12-01 15:49:43 +01:00
+++ 1.3/mysql-test/t/ndb_restore_compat.test 2006-12-01 15:49:43 +01:00
@@ -21,7 +21,7 @@ SELECT * FROM GL ORDER BY TIM
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 TIM
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;
--- 1.5/mysql-test/t/rpl_ndb_idempotent.test 2006-12-01 15:49:43 +01:00
+++ 1.6/mysql-test/t/rpl_ndb_idempotent.test 2006-12-01 15:49:43 +01:00
@@ -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` ;
--- 1.3/mysql-test/t/rpl_ndb_multi.test 2006-12-01 15:49:43 +01:00
+++ 1.4/mysql-test/t/rpl_ndb_multi.test 2006-12-01 15:49:43 +01:00
@@ -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` ;
--- 1.10/mysql-test/t/rpl_ndb_sync.test 2006-12-01 15:49:43 +01:00
+++ 1.11/mysql-test/t/rpl_ndb_sync.test 2006-12-01 15:49:43 +01:00
@@ -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
--- 1.89/sql/ha_ndbcluster_binlog.cc 2006-12-01 15:49:43 +01:00
+++ 1.90/sql/ha_ndbcluster_binlog.cc 2006-12-01 15:49:43 +01:00
@@ -94,8 +94,8 @@ static ulonglong ndb_latest_applied_binl
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_S
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
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 *bu
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_SH
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
- 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_statu
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_tabl
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_tabl
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, N
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, N
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, N
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 @@ end:
&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(TH
{
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(TH
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_po
/*********************************************************************
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, T
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
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
{
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 *
"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
}
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 *s
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 *s
{
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 *s
}
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 *s
}
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, c
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_erro
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_erro
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_erro
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(
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(
(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(
*/
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
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 @@ restart:
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 @@ restart:
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 @@ restart:
!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 @@ restart:
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 @@ restart:
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 @@ restart:
}
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 @@ restart:
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 @@ restart:
{
ndb_binlog_tables_inited= FALSE;
close_thread_tables(thd);
- binlog_index= 0;
+ ndb_binlog_index= 0;
goto restart;
}
err:
@@ -3992,15 +3992,15 @@ err:
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 */
--- 1.19/sql/ha_ndbcluster_binlog.h 2006-12-01 15:49:43 +01:00
+++ 1.20/sql/ha_ndbcluster_binlog.h 2006-12-01 15:49:43 +01:00
@@ -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;
--- 1.3/sql/ha_ndbcluster_tables.h 2006-12-01 15:49:43 +01:00
+++ 1.4/sql/ha_ndbcluster_tables.h 2006-12-01 15:49:43 +01:00
@@ -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"
--- 1.43/mysql-test/r/system_mysql_db.result 2006-12-01 15:49:43 +01:00
+++ 1.44/mysql-test/r/system_mysql_db.result 2006-12-01 15:49:43 +01:00
@@ -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
--- 1.27/mysql-test/t/system_mysql_db_fix.test 2006-12-01 15:49:43 +01:00
+++ 1.28/mysql-test/t/system_mysql_db_fix.test 2006-12-01 15:49:43 +01:00
@@ -96,7 +96,7 @@ INSERT INTO user VALUES ('localhost','',
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
--- 1.41/scripts/mysql_create_system_tables.sh 2006-12-01 15:49:43 +01:00
+++ 1.42/scripts/mysql_create_system_tables.sh 2006-12-01 15:49:43 +01:00
@@ -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
| Thread |
|---|
| • bk commit into 5.1 tree (mskold:1.2337) | Martin Skold | 1 Dec |