dbTalk Databases Forums  

bk commit into 5.1-ndb tree (joreland:1.1742)

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss bk commit into 5.1-ndb tree (joreland:1.1742) in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jonas.oreland@mysql.com
 
Posts: n/a

Default bk commit into 5.1-ndb tree (joreland:1.1742) - 02-16-2005 , 04:39 AM







Below is the list of changes that have just been committed into a local
5.1-ndb 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/in...urce-tree.html

ChangeSet
1.1742 05/02/16 11:39:18 joreland (AT) mysql (DOT) com +1 -0
wl1866 - fix online index build for ordered index

ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
1.33 05/02/16 11:39:14 joreland (AT) mysql (DOT) com +52 -22
Fix online index build for ordered index
- build all copies of tuple in 1 time slice

# 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: joreland
# Host: eel.hemma.oreland.se
# Root: /home/jonas/src/mysql-5.1-ndb

--- 1.32/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp Wed Feb 16 08:31:31 2005
+++ 1.33/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp Wed Feb 16 11:39:14 2005
@@ -157,7 +157,7 @@
OperationrecPtr opPtr;
opPtr.i= tuple_ptr->m_operation_ptr_i;
Uint32 loopGuard= 0;
- while (true) {
+ while (opPtr.i != RNIL) {
c_operation_pool.getPtr(opPtr);
if (opPtr.p->tupVersion == tupVersion) {
ljam();
@@ -533,25 +533,6 @@
OperationrecPtr pageOperPtr;
pageOperPtr.i= tuple_ptr->m_operation_ptr_i;
page_index= pageOffset;
- if (pageOperPtr.i != RNIL) {
- /*
- If there is an ongoing operation on the tuple then it is either a
- copy tuple or an original tuple with an ongoing transaction. In
- both cases realPageId and pageOffset refer to the original tuple.
- The tuple address stored in TUX will always be the original tuple
- but with the tuple version of the tuple we found.
-
- This is necessary to avoid having to update TUX at abort of
- update. If an update aborts then the copy tuple is copied to
- the original tuple. The build will however have found that
- tuple as a copy tuple. The original tuple is stable and is thus
- preferrable to store in TUX.
- */
- ljam();
- c_operation_pool.getPtr(pageOperPtr);
- realPageId= pageOperPtr.p->m_tuple_location.m_page_no;
- page_index= pageOperPtr.p->m_tuple_location.m_page_idx;
- }
#ifdef TIME_MEASUREMENT
NdbTick_getMicroTimer(&start);
#endif
@@ -567,8 +548,57 @@
req->tupFragPtrI = fragPtr.i;
req->fragPageId = buildPtr.p->m_pageId;
req->pageIndex = page_index;
- EXECUTE_DIRECT(buildPtr.p->m_buildRef, GSN_TUX_MAINT_REQ,
- signal, TuxMaintReq::SignalLength+2);
+
+ if (pageOperPtr.i == RNIL)
+ {
+ EXECUTE_DIRECT(buildPtr.p->m_buildRef, GSN_TUX_MAINT_REQ,
+ signal, TuxMaintReq::SignalLength+2);
+ }
+ else
+ {
+ /*
+ If there is an ongoing operation on the tuple then it is either a
+ copy tuple or an original tuple with an ongoing transaction. In
+ both cases realPageId and pageOffset refer to the original tuple.
+ The tuple address stored in TUX will always be the original tuple
+ but with the tuple version of the tuple we found.
+
+ This is necessary to avoid having to update TUX at abort of
+ update. If an update aborts then the copy tuple is copied to
+ the original tuple. The build will however have found that
+ tuple as a copy tuple. The original tuple is stable and is thus
+ preferrable to store in TUX.
+ */
+ ljam();
+
+ /**
+ * Since copy tuples now can't be found on real pages.
+ * we will here build all copies of the tuple
+ *
+ * Note only "real" tupVersion's should be added
+ * i.e delete's should be added
+ * (unless it's the first op, when "original" should be added)
+ */
+ do
+ {
+ c_operation_pool.getPtr(pageOperPtr);
+ if(pageOperPtr.p->op_struct.op_type != ZDELETE ||
+ pageOperPtr.p->is_first_operation())
+ {
+ req->errorCode = RNIL;
+ req->tupVersion= pageOperPtr.p->tupVersion;
+ EXECUTE_DIRECT(buildPtr.p->m_buildRef, GSN_TUX_MAINT_REQ,
+ signal, TuxMaintReq::SignalLength+2);
+ i++;
+ }
+ else
+ {
+ req->errorCode= 0;
+ }
+ pageOperPtr.i= pageOperPtr.p->prevActiveOp;
+ } while(req->errorCode == 0 && pageOperPtr.i != RNIL);
+ }
+
ljamEntry();
if (req->errorCode != 0) {
switch (req->errorCode) {

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?uns...ie.nctu.edu.tw


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.