#At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:ole.john.aske@stripped
3429 Ole John Aske 2011-02-10
spj-scan-scan: Fixed some more incorrect 'size' spec when using Bitmask<size>.
modified:
storage/ndb/src/ndbapi/NdbQueryBuilder.cpp
storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp
=== modified file 'storage/ndb/src/ndbapi/NdbQueryBuilder.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryBuilder.cpp 2011-02-04 08:45:18 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryBuilder.cpp 2011-02-10 11:54:23 +0000
@@ -332,7 +332,7 @@ NdbQueryDef::destroy() const
void
NdbQueryDef::print() const
{
- m_impl.getQueryOperation(0U).printTree(0, Bitmask<NDB_SPJ_MAX_TREE_NODES>());
+ m_impl.getQueryOperation(0U).printTree(0, Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32>());
}
/*************************************************************************
@@ -1137,7 +1137,7 @@ NdbQueryBuilderImpl::prepare()
if (doPrintQueryTree)
{
ndbout << "Query tree:" << endl;
- def->getQueryOperation(0U).printTree(0, Bitmask<NDB_SPJ_MAX_TREE_NODES>());
+ def->getQueryOperation(0U).printTree(0, Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32>());
}
return def;
@@ -2102,7 +2102,7 @@ NdbQueryOperationDefImpl::appendChildPro
* that connect the tree nodes.
*/
static void printMargin(Uint32 depth,
- Bitmask<NDB_SPJ_MAX_TREE_NODES> hasMoreSiblingsMask,
+ Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32> hasMoreSiblingsMask,
bool header)
{
if (depth > 0)
@@ -2136,11 +2136,11 @@ static void printMargin(Uint32 depth,
void
NdbQueryOperationDefImpl::printTree(Uint32 depth,
- Bitmask<NDB_SPJ_MAX_TREE_NODES>
+ Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32>
hasMoreSiblingsMask) const
{
// Print vertical line leading down to this node.
- Bitmask<NDB_SPJ_MAX_TREE_NODES> firstLineMask = hasMoreSiblingsMask;
+ Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32> firstLineMask = hasMoreSiblingsMask;
firstLineMask.set(depth);
printMargin(depth, firstLineMask, false);
ndbout << endl;
=== modified file 'storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp 2011-02-08 12:14:41 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryBuilderImpl.hpp 2011-02-10 11:54:23 +0000
@@ -432,8 +432,9 @@ public:
* @param hasMoreSiblingsMask The n'th bit should be set if the n'th ancestor
* (counted from the root) has more sibling nodes.
*/
- void printTree(Uint32 depth,
- Bitmask<NDB_SPJ_MAX_TREE_NODES> hasMoreSiblingsMask) const;
+ void printTree(
+ Uint32 depth,
+ Bitmask<(NDB_SPJ_MAX_TREE_NODES+31)/32> hasMoreSiblingsMask) const;
protected:
// QueryTree building:
Attachment: [text/bzr-bundle] bzr/ole.john.aske@oracle.com-20110210115423-s79ccdu0yhgdtpqr.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3429) | Ole John Aske | 10 Feb |