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
1.1968 05/11/26 08:10:57 jonas@eel.(none) +1 -0
ndb - varsize
Fix index build of varsize tuple
storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
1.17 05/11/26 08:10:52 jonas@eel.(none) +16 -34
Fix index build of varsize tuple
# 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: eel.(none)
# Root: /home/jonas/src/51-ndb
--- 1.16/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp 2005-11-04 08:12:53 +01:00
+++ 1.17/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp 2005-11-26 08:10:52 +01:00
@@ -452,7 +452,9 @@
tablePtr.i= buildReq->getTableId();
ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec);
- const Uint32 firstTupleNo = ! buildPtr.p->m_build_vs ? 0 : 1;
+ const Uint32 firstTupleNo = 0;
+ const Uint32 tupheadsize = tablePtr.p->m_offsets[MM].m_fix_header_size +
+ (buildPtr.p->m_build_vs ? Tuple_header::HeaderSize + 1: 0);
#ifdef TIME_MEASUREMENT
MicroSecondTimer start;
@@ -501,39 +503,19 @@
// get tuple
Uint32 pageIndex = ~0;
const Tuple_header* tuple_ptr = 0;
- if (! buildPtr.p->m_build_vs) {
- Uint32 tupheadsize= tablePtr.p->m_offsets[MM].m_fix_header_size;
- pageIndex = buildPtr.p->m_tupleNo * tupheadsize;
- if (pageIndex + tupheadsize > Fix_page::DATA_WORDS) {
- ljam();
- buildPtr.p->m_pageId++;
- buildPtr.p->m_tupleNo= firstTupleNo;
- break;
- }
- tuple_ptr = (Tuple_header*)&pagePtr.p->m_data[pageIndex];
- // skip over free tuple
- if (tuple_ptr->m_header_bits & Tuple_header::FREE) {
- ljam();
- buildPtr.p->m_tupleNo++;
- break;
- }
- } else {
- pageIndex = buildPtr.p->m_tupleNo;
- Var_page* page_ptr = (Var_page*)pagePtr.p;
- if (pageIndex >= page_ptr->high_index) {
- ljam();
- buildPtr.p->m_pageId++;
- buildPtr.p->m_tupleNo= firstTupleNo;
- break;
- }
- Uint32 word= page_ptr->get_index_word(pageIndex);
- if (word & (Var_page::CHAIN | Var_page::FREE))
- {
- ljam();
- buildPtr.p->m_tupleNo++;
- break;
- }
- tuple_ptr = (Tuple_header*)page_ptr->get_ptr(pageIndex);
+ pageIndex = buildPtr.p->m_tupleNo * tupheadsize;
+ if (pageIndex + tupheadsize > Fix_page::DATA_WORDS) {
+ ljam();
+ buildPtr.p->m_pageId++;
+ buildPtr.p->m_tupleNo= firstTupleNo;
+ break;
+ }
+ tuple_ptr = (Tuple_header*)&pagePtr.p->m_data[pageIndex];
+ // skip over free tuple
+ if (tuple_ptr->m_header_bits & Tuple_header::FREE) {
+ ljam();
+ buildPtr.p->m_tupleNo++;
+ break;
}
Uint32 tupVersion= tuple_ptr->get_tuple_version();
OperationrecPtr pageOperPtr;
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.1968) | jonas | 26 Nov |