Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron 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.1980 05/12/01 20:27:12 mikron@stripped +2 -0
Fixed upgrade code
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.41 05/12/01 20:27:01 mikron@stripped +46 -1
Fixed upgrade code
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
1.13 05/12/01 20:27:01 mikron@stripped +3 -0
Fixed upgrade code
# 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: mikron
# Host: c-6308e253.1238-1-64736c10.cust.bredbandsbolaget.se
# Root: /Users/mikron/wl2496
--- 1.12/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2005-11-30 05:32:32 +01:00
+++ 1.13/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2005-12-01 20:27:01 +01:00
@@ -1577,6 +1577,9 @@
* This variable must be atleast the size of Sysfile::SYSFILE_SIZE32
*/
Uint32 cdata[DIH_CDATA_SIZE]; /* TEMPORARY ARRAY VARIABLE */
+ Uint32 c_comp_data[DIH_CDATA_SIZE]; /* TEMPORARY ARRAY VARIABLE */
+
+ void convert_sysfile_from_pre5_1_4_format();
/**
* Sys file data
--- 1.40/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2005-11-30 05:32:32 +01:00
+++ 1.41/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2005-12-01 20:27:01 +01:00
@@ -147,7 +147,7 @@
copyGCI->anyData = nodeId;
copyGCI->copyReason = c_copyGCIMaster.m_copyReason;
copyGCI->startWord = 0;
-
+
for(Uint32 i = 0; i < noOfSignals; i++) {
jam();
{ // Do copy
@@ -641,6 +641,17 @@
}//if
Uint32 tmp= SYSFILE->m_restart_seq;
+ Uint32 sendId = refToNode(signal->senderBlockRef());
+ if (getNodeInfo(sendId).m_version < MAKE_VERSION(5,1,4))
+ {
+ /*
+ UPGRADE CODE:
+ In 5.1.4 we expanded the Sysfile to use 16 bits per node id
+ rather than 8 bits. Due to this we also introduced run-length
+ compression of the sysfile contents to decrease load on GCP's.
+ */
+ convert_sysfile_from_pre5_1_4_format();
+ }
memcpy(sysfileData, cdata, sizeof(sysfileData));
SYSFILE->m_restart_seq = tmp;
@@ -14413,3 +14424,37 @@
copyCompleted = false;
allowNodeStart = true;
}
+
+
+void Dbdih::convert_sysfile_from_pre5_1_4_format()
+{
+ Uint32 i;
+ Uint32 ng_inx = 6 + MAX_NDB_NODES + NODE_ARRAY_SIZE(MAX_NDB_NODES, 4);
+ Uint32 old_to_inx = ng_inx + NODE_ARRAY_SIZE(MAX_NDB_NODES, 8);
+ Uint32 new_to_inx = ng_inx + NODE_ARRAY_SIZE(MAX_NDB_NODES, 16);
+ Uint32 old_bitmask_inx = old_to_inx + NODE_ARRAY_SIZE(MAX_NDB_NODES, 8);
+ Uint32 new_bitmask_inx = new_to_inx + NODE_ARRAY_SIZE(MAX_NDB_NODES, 16);
+ uint8 *old_to_ptr = (uint8*)&cdata[old_to_inx];
+ uint16 *new_to_ptr = (uint16*)&cdata[new_to_inx];
+ uint8 *old_ng_ptr= old_to_ptr; //Copy backwards
+ uint16 *new_ng_ptr = new_to_ptr;
+
+ memmove((char*)&cdata[old_bitmask_inx],
+ (char*)&cdata[new_bitmask_inx],
+ _NDB_NODE_BITMASK_SIZE*4);
+ for (i = 0; i < MAX_NDB_NODES; i++)
+ {
+ uint16 old_to = *old_to_ptr++;
+ *new_to_ptr = old_to;
+ new_to_ptr++;
+ old_to_ptr++;
+ }
+ for (i = 0; i < MAX_NDB_NODES; i++)
+ {
+ uint16 old_ng = *old_ng_ptr;
+ *new_ng_ptr = old_ng;
+ old_ng_ptr--;
+ new_ng_ptr--;
+ }
+}
+
| Thread |
|---|
| • bk commit into 5.1 tree (mikron:1.1980) | mikael | 7 Dec |