Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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-09-05 14:57:35+02:00, jonas@stripped +3 -0
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
into perch.ndb.mysql.com:/home/jonas/src/51-jonas
MERGE: 1.2256.1.51
sql/ha_ndbcluster.cc@stripped, 2006-09-05 14:57:31+02:00, jonas@stripped +0 -0
Auto merged
MERGE: 1.346.1.11
sql/ha_ndbcluster_binlog.cc@stripped, 2006-09-05 14:57:31+02:00, jonas@stripped
+0 -0
Auto merged
MERGE: 1.78.1.2
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2006-09-05 14:57:32+02:00,
jonas@stripped +0 -0
Auto merged
MERGE: 1.92.1.9
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-jonas/RESYNC
--- 1.96/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-09-05 14:57:39 +02:00
+++ 1.97/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2006-09-05 14:57:39 +02:00
@@ -7295,7 +7295,7 @@
if(objEntry->m_tableType==DictTabInfo::Datafile)
{
jam();
- GetTabInfoReq *req= (GetTabInfoReq*)signal->theData;
+ GetTabInfoReq *req= (GetTabInfoReq*)signal->getDataPtrSend();
req->senderData= c_retrieveRecord.retrievePage;
req->senderRef= reference();
req->requestType= GetTabInfoReq::RequestById;
@@ -7307,7 +7307,7 @@
else if(objEntry->m_tableType==DictTabInfo::LogfileGroup)
{
jam();
- GetTabInfoReq *req= (GetTabInfoReq*)signal->theData;
+ GetTabInfoReq *req= (GetTabInfoReq*)signal->getDataPtrSend();
req->senderData= c_retrieveRecord.retrievePage;
req->senderRef= reference();
req->requestType= GetTabInfoReq::RequestById;
--- 1.353/sql/ha_ndbcluster.cc 2006-09-05 14:57:39 +02:00
+++ 1.354/sql/ha_ndbcluster.cc 2006-09-05 14:57:39 +02:00
@@ -49,6 +49,16 @@
extern const char *opt_ndbcluster_connectstring;
extern ulong opt_ndb_cache_check_time;
+// ndb interface initialization/cleanup
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern void ndb_init_internal();
+extern void ndb_end_internal();
+#ifdef __cplusplus
+}
+#endif
+
const char *ndb_distribution_names[]= {"KEYHASH", "LINHASH", NullS};
TYPELIB ndb_distribution_typelib= { array_elements(ndb_distribution_names)-1,
"", ndb_distribution_names, NULL };
@@ -6394,6 +6404,9 @@
if (have_ndbcluster != SHOW_OPTION_YES)
DBUG_RETURN(0); // nothing else to do
+ // Initialize ndb interface
+ ndb_init_internal();
+
// Set connectstring if specified
if (opt_ndbcluster_connectstring != 0)
DBUG_PRINT("connectstring", ("%s", opt_ndbcluster_connectstring));
@@ -6542,6 +6555,9 @@
}
delete g_ndb_cluster_connection;
g_ndb_cluster_connection= NULL;
+
+ // cleanup ndb interface
+ ndb_end_internal();
pthread_mutex_destroy(&ndbcluster_mutex);
pthread_mutex_destroy(&LOCK_ndb_util_thread);
--- 1.80/sql/ha_ndbcluster_binlog.cc 2006-09-05 14:57:39 +02:00
+++ 1.81/sql/ha_ndbcluster_binlog.cc 2006-09-05 14:57:39 +02:00
@@ -25,6 +25,7 @@
#include "slave.h"
#include "ha_ndbcluster_binlog.h"
#include "NdbDictionary.hpp"
+#include "ndb_cluster_connection.hpp"
#include <util/NdbAutoPtr.hpp>
#ifdef ndb_dynamite
@@ -111,8 +112,7 @@
static void ndb_free_schema_object(NDB_SCHEMA_OBJECT **ndb_schema_object,
bool have_lock);
-/* instantiated in storage/ndb/src/ndbapi/Ndbif.cpp */
-extern Uint64 g_latest_trans_gci;
+static Uint64 *p_latest_trans_gci= 0;
/*
Global variables for holding the binlog_index table reference
@@ -439,7 +439,7 @@
{
DBUG_ENTER("ndbcluster_binlog_wait");
const char *save_info= thd ? thd->proc_info : 0;
- ulonglong wait_epoch= g_latest_trans_gci;
+ ulonglong wait_epoch= *p_latest_trans_gci;
int count= 30;
if (thd)
thd->proc_info= "Waiting for ndbcluster binlog update to "
@@ -3284,6 +3284,7 @@
DBUG_VOID_RETURN;
}
+
pthread_handler_t ndb_binlog_thread_func(void *arg)
{
THD *thd; /* needs to be first for thread_stack */
@@ -3292,6 +3293,7 @@
Thd_ndb *thd_ndb=0;
int ndb_update_binlog_index= 1;
injector *inj= injector::instance();
+
#ifdef RUN_NDB_BINLOG_TIMER
Timer main_timer;
#endif
@@ -3380,6 +3382,8 @@
*/
injector_thd= thd;
injector_ndb= i_ndb;
+ p_latest_trans_gci=
+ injector_ndb->get_ndb_cluster_connection().get_latest_trans_gci();
schema_ndb= s_ndb;
ndb_binlog_thread_running= 1;
if (opt_bin_log)
@@ -3476,7 +3480,7 @@
"ndb_latest_handled_binlog_epoch: %u, while current epoch: %u. "
"RESET MASTER should be issued. Resetting
ndb_latest_handled_binlog_epoch.",
(unsigned) ndb_latest_handled_binlog_epoch, (unsigned)
schema_gci);
- g_latest_trans_gci= 0;
+ *p_latest_trans_gci= 0;
ndb_latest_handled_binlog_epoch= 0;
ndb_latest_applied_binlog_epoch= 0;
ndb_latest_received_binlog_epoch= 0;
@@ -3503,7 +3507,7 @@
}
do_ndbcluster_binlog_close_connection= BCCC_running;
for ( ; !((abort_loop || do_ndbcluster_binlog_close_connection) &&
- ndb_latest_handled_binlog_epoch >= g_latest_trans_gci) &&
+ ndb_latest_handled_binlog_epoch >= *p_latest_trans_gci) &&
do_ndbcluster_binlog_close_connection != BCCC_restart; )
{
#ifndef DBUG_OFF
@@ -3511,8 +3515,8 @@
{
DBUG_PRINT("info", ("do_ndbcluster_binlog_close_connection: %d, "
"ndb_latest_handled_binlog_epoch: %llu, "
- "g_latest_trans_gci: %llu",
do_ndbcluster_binlog_close_connection,
- ndb_latest_handled_binlog_epoch, g_latest_trans_gci));
+ "*p_latest_trans_gci: %llu",
do_ndbcluster_binlog_close_connection,
+ ndb_latest_handled_binlog_epoch, *p_latest_trans_gci));
}
#endif
#ifdef RUN_NDB_BINLOG_TIMER
@@ -3548,7 +3552,7 @@
}
if ((abort_loop || do_ndbcluster_binlog_close_connection) &&
- (ndb_latest_handled_binlog_epoch >= g_latest_trans_gci ||
+ (ndb_latest_handled_binlog_epoch >= *p_latest_trans_gci ||
!ndb_binlog_running))
break; /* Shutting down server */
@@ -3598,11 +3602,11 @@
{
DBUG_PRINT("info", ("do_ndbcluster_binlog_close_connection= BCCC_restart"));
do_ndbcluster_binlog_close_connection= BCCC_restart;
- if (ndb_latest_received_binlog_epoch < g_latest_trans_gci &&
ndb_binlog_running)
+ if (ndb_latest_received_binlog_epoch < *p_latest_trans_gci &&
ndb_binlog_running)
{
sql_print_error("NDB Binlog: latest transaction in epoch %lld not in binlog
"
"as latest received epoch is %lld",
- g_latest_trans_gci, ndb_latest_received_binlog_epoch);
+ *p_latest_trans_gci, ndb_latest_received_binlog_epoch);
}
}
}
@@ -3784,11 +3788,11 @@
{
DBUG_PRINT("info", ("do_ndbcluster_binlog_close_connection=
BCCC_restart"));
do_ndbcluster_binlog_close_connection= BCCC_restart;
- if (ndb_latest_received_binlog_epoch < g_latest_trans_gci &&
ndb_binlog_running)
+ if (ndb_latest_received_binlog_epoch < *p_latest_trans_gci &&
ndb_binlog_running)
{
sql_print_error("NDB Binlog: latest transaction in epoch %lld not in
binlog "
"as latest received epoch is %lld",
- g_latest_trans_gci, ndb_latest_received_binlog_epoch);
+ *p_latest_trans_gci, ndb_latest_received_binlog_epoch);
}
}
}
@@ -3865,6 +3869,7 @@
ndb_obj_cnt+= ndbcluster_util_inited ? 1 : 0;
injector_thd= 0;
injector_ndb= 0;
+ p_latest_trans_gci= 0;
schema_ndb= 0;
pthread_mutex_unlock(&injector_mutex);
thd->db= 0; // as not to try to free memory
@@ -3985,7 +3990,7 @@
"latest_handled_binlog_epoch=%s, "
"latest_applied_binlog_epoch=%s",
llstr(ndb_latest_epoch, buff1),
- llstr(g_latest_trans_gci, buff2),
+ llstr(*p_latest_trans_gci, buff2),
llstr(ndb_latest_received_binlog_epoch, buff3),
llstr(ndb_latest_handled_binlog_epoch, buff4),
llstr(ndb_latest_applied_binlog_epoch, buff5));
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2267) | jonas | 5 Sep |