Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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, 2007-10-15 23:41:02+02:00, tomas@stripped +5 -0
Bug #31618 ndb_binlog_discover test failure
- add additional flag ndb_binlog_is_ready to indicate that binlog has flushed old events
and is ready to receive new ones
mysql-test/suite/ndb/r/ndb_binlog_discover.result@stripped, 2007-10-15 23:40:59+02:00,
tomas@stripped +3 -0
Bug #31618 ndb_binlog_discover test failure
- add select to ensure that data was inserted
mysql-test/suite/ndb/t/ndb_binlog_discover.test@stripped, 2007-10-15 23:40:59+02:00,
tomas@stripped +3 -0
Bug #31618 ndb_binlog_discover test failure
- add select to ensure that data was inserted
sql/ha_ndbcluster.cc@stripped, 2007-10-15 23:40:59+02:00, tomas@stripped +1
-1
Bug #31618 ndb_binlog_discover test failure
- add additional flag ndb_binlog_is_ready to indicate that binlog has flushed old
events and is ready to receive new ones
sql/ha_ndbcluster_binlog.cc@stripped, 2007-10-15 23:40:59+02:00,
tomas@stripped +8 -0
Bug #31618 ndb_binlog_discover test failure
- add additional flag ndb_binlog_is_ready to indicate that binlog has flushed old
events and is ready to receive new ones
sql/ha_ndbcluster_binlog.h@stripped, 2007-10-15 23:40:59+02:00,
tomas@stripped +1 -0
Bug #31618 ndb_binlog_discover test failure
- add additional flag ndb_binlog_is_ready to indicate that binlog has flushed old
events and is ready to receive new ones
diff -Nrup a/mysql-test/suite/ndb/r/ndb_binlog_discover.result
b/mysql-test/suite/ndb/r/ndb_binlog_discover.result
--- a/mysql-test/suite/ndb/r/ndb_binlog_discover.result 2007-06-27 14:27:30 +02:00
+++ b/mysql-test/suite/ndb/r/ndb_binlog_discover.result 2007-10-15 23:40:59 +02:00
@@ -1,6 +1,9 @@
drop table if exists t1;
create table t1 (a int key) engine=ndb;
reset master;
+select * from t1;
+a
+1
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Incident 1 # #1 (LOST_EVENTS)
diff -Nrup a/mysql-test/suite/ndb/t/ndb_binlog_discover.test
b/mysql-test/suite/ndb/t/ndb_binlog_discover.test
--- a/mysql-test/suite/ndb/t/ndb_binlog_discover.test 2007-07-25 15:29:29 +02:00
+++ b/mysql-test/suite/ndb/t/ndb_binlog_discover.test 2007-10-15 23:40:59 +02:00
@@ -29,6 +29,9 @@ while ($mysql_errno)
}
--enable_query_log
+# check that data went in ok
+select * from t1;
+
--source include/show_binlog_events2.inc
PURGE MASTER LOGS TO 'master-bin.000002';
diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc 2007-10-14 16:46:42 +02:00
+++ b/sql/ha_ndbcluster.cc 2007-10-15 23:40:59 +02:00
@@ -6978,7 +6978,7 @@ int ha_ndbcluster::open(const char *name
DBUG_RETURN(res);
}
#ifdef HAVE_NDB_BINLOG
- if (!ndb_binlog_tables_inited && ndb_binlog_running)
+ if (!ndb_binlog_tables_inited && ndb_binlog_running &&
!ndb_binlog_is_ready)
table->db_stat|= HA_READ_ONLY;
#endif
DBUG_RETURN(0);
diff -Nrup a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
--- a/sql/ha_ndbcluster_binlog.cc 2007-09-18 17:10:16 +02:00
+++ b/sql/ha_ndbcluster_binlog.cc 2007-10-15 23:40:59 +02:00
@@ -60,6 +60,7 @@ int ndb_binlog_thread_running= 0;
*/
my_bool ndb_binlog_running= FALSE;
my_bool ndb_binlog_tables_inited= FALSE;
+my_bool ndb_binlog_is_ready= FALSE;
/*
Global reference to the ndb injector thread THD oject
@@ -1974,6 +1975,7 @@ ndb_binlog_thread_handle_schema_event(TH
ndb_schema_share->use_count));
free_share(&ndb_schema_share);
ndb_schema_share= 0;
+ ndb_binlog_is_ready= FALSE;
pthread_mutex_unlock(&ndb_schema_share_mutex);
/* end protect ndb_schema_share */
@@ -4319,6 +4321,12 @@ restart:
}
}
}
+ /*
+ binlog thread is ready to receive events
+ - client threads may now start updating data, i.e. tables are
+ no longer read only
+ */
+ ndb_binlog_is_ready= TRUE;
{
static char db[]= "";
thd->db= db;
diff -Nrup a/sql/ha_ndbcluster_binlog.h b/sql/ha_ndbcluster_binlog.h
--- a/sql/ha_ndbcluster_binlog.h 2007-09-18 17:10:16 +02:00
+++ b/sql/ha_ndbcluster_binlog.h 2007-10-15 23:40:59 +02:00
@@ -210,6 +210,7 @@ extern NDB_SHARE *ndb_schema_share;
extern THD *injector_thd;
extern my_bool ndb_binlog_running;
extern my_bool ndb_binlog_tables_inited;
+extern my_bool ndb_binlog_is_ready;
bool
ndbcluster_show_status_binlog(THD* thd, stat_print_fn *stat_print,
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2661) BUG#31618 | tomas | 15 Oct |