diff options
author | unknown <pekka@mysql.com> | 2004-10-20 12:25:48 +0200 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2004-10-20 12:25:48 +0200 |
commit | 6875cf36d1625449f539c9eaefb8171158231ee2 (patch) | |
tree | 9b27e04f7e5e4b08826bc6dabf63a592f44960a8 /ndb/src | |
parent | 2da1cbd97dd566d629115f02321ab36aac069ce4 (diff) | |
download | mariadb-git-6875cf36d1625449f539c9eaefb8171158231ee2.tar.gz |
NDB dbtux compile fix for sol9x86
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
compile fix for sol9x86
ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp:
compile fix for sol9x86
ndb/test/ndbapi/testOIBasic.cpp:
testing continues..
Diffstat (limited to 'ndb/src')
-rw-r--r-- | ndb/src/kernel/blocks/dbtux/Dbtux.hpp | 8 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp index dc95bf8e8ea..34c878bda4b 100644 --- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp +++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp @@ -240,7 +240,7 @@ private: struct TreeNode { TupLoc m_link[3]; // link to 0-left child 1-right child 2-parent unsigned m_side : 2; // we are 0-left child 1-right child 2-root - int m_balance : 2; // balance -1, 0, +1 + unsigned m_balance : 2; // balance -1, 0, +1 plus 1 for Solaris CC unsigned pad1 : 4; Uint8 m_occup; // current number of entries Uint32 m_nodeScan; // list of scans at this node @@ -927,7 +927,7 @@ Dbtux::TreeEnt::cmp(const TreeEnt ent) const inline Dbtux::TreeNode::TreeNode() : m_side(2), - m_balance(0), + m_balance(0 + 1), pad1(0), m_occup(0), m_nodeScan(RNIL) @@ -1156,7 +1156,7 @@ Dbtux::NodeHandle::getOccup() inline int Dbtux::NodeHandle::getBalance() { - return m_node->m_balance; + return (int)m_node->m_balance - 1; } inline Uint32 @@ -1191,7 +1191,7 @@ inline void Dbtux::NodeHandle::setBalance(int b) { ndbrequire(abs(b) <= 1); - m_node->m_balance = b; + m_node->m_balance = (unsigned)(b + 1); } inline void diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp index 6c2a29f54cc..c5c22264460 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp @@ -283,7 +283,7 @@ operator<<(NdbOut& out, const Dbtux::TreeNode& node) out << " [up " << node.m_link[2] << "]"; out << " [side " << dec << node.m_side << "]"; out << " [occup " << dec << node.m_occup << "]"; - out << " [balance " << dec << (int)node.m_balance << "]"; + out << " [balance " << dec << (int)node.m_balance - 1 << "]"; out << " [nodeScan " << hex << node.m_nodeScan << "]"; out << "]"; return out; |