Below is the list of changes that have just been committed into a local
5.0 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
1.2132 06/05/15 18:44:17 tomas@stripped +9 -0
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
ndb/src/ndbapi/ClusterMgr.hpp
1.7 06/05/15 18:44:12 tomas@stripped +1 -1
manual merge
ndb/src/ndbapi/ClusterMgr.cpp
1.22 06/05/15 18:44:12 tomas@stripped +2 -2
manual merge
ndb/include/ndbapi/ndb_cluster_connection.hpp
1.12 06/05/15 18:44:12 tomas@stripped +1 -1
manual merge
sql/ha_ndbcluster.cc
1.246 06/05/15 17:17:26 tomas@stripped +0 -0
Auto merged
ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
1.4 06/05/15 17:17:26 tomas@stripped +0 -0
Auto merged
ndb/src/ndbapi/ndb_cluster_connection.cpp
1.36 06/05/15 17:17:26 tomas@stripped +0 -0
Auto merged
ndb/src/ndbapi/TransporterFacade.hpp
1.28 06/05/15 17:17:26 tomas@stripped +0 -0
Auto merged
ndb/src/ndbapi/DictCache.hpp
1.10 06/05/15 17:17:26 tomas@stripped +0 -0
Auto merged
ndb/src/ndbapi/DictCache.cpp
1.16 06/05/15 17:17:26 tomas@stripped +0 -0
Auto merged
# 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: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql-5.0/RESYNC
--- 1.21/ndb/src/ndbapi/ClusterMgr.cpp 2005-07-22 12:29:15 +02:00
+++ 1.22/ndb/src/ndbapi/ClusterMgr.cpp 2006-05-15 18:44:12 +02:00
@@ -70,6 +70,7 @@
noOfAliveNodes= 0;
noOfConnectedNodes= 0;
theClusterMgrThread= 0;
+ m_connect_count = 0;
DBUG_VOID_RETURN;
}
@@ -469,6 +470,10 @@
theNode.nfCompleteRep = false;
if(noOfAliveNodes == 0)
{
+ theFacade.m_globalDictCache.lock();
+ theFacade.m_globalDictCache.invalidate_all();
+ theFacade.m_globalDictCache.unlock();
+ m_connect_count ++;
NFCompleteRep rep;
for(Uint32 i = 1; i<MAX_NODES; i++){
if(theNodes[i].defined && theNodes[i].nfCompleteRep == false){
--- 1.6/ndb/src/ndbapi/ClusterMgr.hpp 2005-07-22 12:29:15 +02:00
+++ 1.7/ndb/src/ndbapi/ClusterMgr.hpp 2006-05-15 18:44:12 +02:00
@@ -79,6 +79,7 @@
Uint32 getNoOfConnectedNodes() const;
void hb_received(NodeId);
+ Uint32 m_connect_count;
private:
Uint32 noOfAliveNodes;
Uint32 noOfConnectedNodes;
--- 1.15/ndb/src/ndbapi/DictCache.cpp 2005-08-18 14:09:08 +02:00
+++ 1.16/ndb/src/ndbapi/DictCache.cpp 2006-05-15 17:17:26 +02:00
@@ -300,6 +300,42 @@
abort();
}
+
+unsigned
+GlobalDictCache::get_size()
+{
+ NdbElement_t<Vector<TableVersion> > * curr = m_tableHash.getNext(0);
+ int sz = 0;
+ while(curr != 0){
+ sz += curr->theData->size();
+ curr = m_tableHash.getNext(curr);
+ }
+ return sz;
+}
+
+void
+GlobalDictCache::invalidate_all()
+{
+ DBUG_ENTER("GlobalDictCache::invalidate_all");
+ NdbElement_t<Vector<TableVersion> > * curr = m_tableHash.getNext(0);
+ while(curr != 0){
+ Vector<TableVersion> * vers = curr->theData;
+ if (vers->size())
+ {
+ TableVersion * ver = & vers->back();
+ ver->m_impl->m_status = NdbDictionary::Object::Invalid;
+ ver->m_status = DROPPED;
+ if (ver->m_refCount == 0)
+ {
+ delete ver->m_impl;
+ vers->erase(vers->size() - 1);
+ }
+ }
+ curr = m_tableHash.getNext(curr);
+ }
+ DBUG_VOID_RETURN;
+}
+
void
GlobalDictCache::release(NdbTableImpl * tab)
{
--- 1.9/ndb/src/ndbapi/DictCache.hpp 2005-08-18 14:09:08 +02:00
+++ 1.10/ndb/src/ndbapi/DictCache.hpp 2006-05-15 17:17:26 +02:00
@@ -71,6 +71,9 @@
void alter_table_rep(const char * name,
Uint32 tableId, Uint32 tableVersion, bool altered);
+
+ unsigned get_size();
+ void invalidate_all();
public:
enum Status {
OK = 0,
--- 1.27/ndb/src/ndbapi/TransporterFacade.hpp 2006-04-18 14:36:27 +02:00
+++ 1.28/ndb/src/ndbapi/TransporterFacade.hpp 2006-05-15 17:17:26 +02:00
@@ -271,6 +271,12 @@
#include "ClusterMgr.hpp"
inline
+unsigned Ndb_cluster_connection_impl::get_connect_count() const
+{
+ return TransporterFacade::instance()->theClusterMgr->m_connect_count;
+}
+
+inline
bool
TransporterFacade::check_send_size(Uint32 node_id, Uint32 send_size)
{
--- 1.245/sql/ha_ndbcluster.cc 2006-04-26 15:47:20 +02:00
+++ 1.246/sql/ha_ndbcluster.cc 2006-05-15 17:17:26 +02:00
@@ -3512,8 +3512,23 @@
{
m_table= (void *)tab;
m_table_version = tab->getObjectVersion();
- if (!(my_errno= build_index_list(ndb, table, ILBP_OPEN)))
+ if ((my_errno= build_index_list(ndb, table, ILBP_OPEN)))
DBUG_RETURN(my_errno);
+
+ const void *data, *pack_data;
+ uint length, pack_length;
+ if (readfrm(table->path, &data, &length) ||
+ packfrm(data, length, &pack_data, &pack_length) ||
+ pack_length != tab->getFrmLength() ||
+ memcmp(pack_data, tab->getFrmData(), pack_length))
+ {
+ my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
+ my_free((char*)pack_data, MYF(MY_ALLOW_ZERO_PTR));
+ NdbError err= ndb->getNdbError(NDB_INVALID_SCHEMA_OBJECT);
+ DBUG_RETURN(ndb_to_mysql_error(&err));
+ }
+ my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
+ my_free((char*)pack_data, MYF(MY_ALLOW_ZERO_PTR));
}
m_table_info= tab_info;
}
--- 1.11/ndb/include/ndbapi/ndb_cluster_connection.hpp 2006-02-13 12:58:03 +01:00
+++ 1.12/ndb/include/ndbapi/ndb_cluster_connection.hpp 2006-05-15 18:44:12 +02:00
@@ -95,6 +95,7 @@
unsigned no_db_nodes();
unsigned node_id();
+ unsigned get_connect_count() const;
#endif
private:
--- 1.35/ndb/src/ndbapi/ndb_cluster_connection.cpp 2006-02-13 12:58:03 +01:00
+++ 1.36/ndb/src/ndbapi/ndb_cluster_connection.cpp 2006-05-15 17:17:26 +02:00
@@ -243,6 +243,12 @@
} while (1);
}
+unsigned Ndb_cluster_connection::get_connect_count() const
+{
+ return m_impl.get_connect_count();
+}
+
+
/*
--- 1.3/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp 2006-02-13 12:58:03 +01:00
+++ 1.4/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp 2006-05-15 17:17:26 +02:00
@@ -49,6 +49,7 @@
void init_get_next_node(Ndb_cluster_connection_node_iter &iter);
Uint32 get_next_node(Ndb_cluster_connection_node_iter &iter);
+ inline unsigned get_connect_count() const;
private:
friend class Ndb;
friend class NdbImpl;
| Thread |
|---|
| • bk commit into 5.0 tree (tomas:1.2132) | tomas | 16 May |