dbTalk Databases Forums  

bk commit into 5.1 tree (jonas:1.1985)

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


Discuss bk commit into 5.1 tree (jonas:1.1985) in the mailing.database.mysql-internals forum.



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

Default bk commit into 5.1 tree (jonas:1.1985) - 09-06-2005 , 07:46 AM






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/in...urce-tree.html

ChangeSet
1.1985 05/09/06 10:33:37 jonas (AT) eel (DOT) (none) +4 -0
ndb diskdata
fix varsize mm + fix dd attributes
fix init problem


storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
1.75 05/09/06 10:33:32 jonas (AT) eel (DOT) (none) +26 -1
Handle varsize mm + fix dd
Make sure to init tuple header of disk part

storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
1.58 05/09/06 10:33:32 jonas (AT) eel (DOT) (none) +4 -0
Handle varsize mm + fix dd

storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
1.79 05/09/06 10:33:32 jonas (AT) eel (DOT) (none) +6 -0
New util method for need_shrink

sql/ha_ndbcluster.cc
1.148 05/09/06 10:33:32 jonas (AT) eel (DOT) (none) +1 -1
Add support (by env variable) to put entire table on disk wo/ doing it in sql

# 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/mysql-5.1-ndb-dd

--- 1.78/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2005-08-25 09:29:04 +02:00
+++ 1.79/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2005-09-06 10:33:32 +02:00
@@ -818,6 +818,12 @@
m_attributes[MM].m_no_of_varsize > 0 ||
m_attributes[DD].m_no_of_varsize > 0;
}
+
+ bool need_shrink(bool disk) const {
+ return
+ m_attributes[MM].m_no_of_varsize > 0 ||
+ (disk && m_attributes[DD].m_no_of_varsize > 0);
+ }

/**
* Descriptors for MM and DD part

--- 1.57/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp 2005-08-31 15:04:52 +02:00
+++ 1.58/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp 2005-09-06 10:33:32 +02:00
@@ -242,6 +242,8 @@
update_free_page_list(regFragPtr, vpagePtr.p);
}
if(0) ndbout_c("");
+ disk_ptr = (Tuple_header*)
+ (((Uint32*)copy)+Tuple_header::HeaderSize+fix_size +sz);
}
else
{
@@ -263,6 +265,7 @@
page, regOperPtr->m_tuple_location.m_page_idx, sz);
update_free_page_list(regFragPtr, (Var_page*)page);
}
+ disk_ptr = (Tuple_header*)(((Uint32*)copy)+sz);
}

if (regTabPtr->m_no_of_disk_attributes)
@@ -313,6 +316,7 @@
memcpy(dst, disk_ptr, 4*sz);
memcpy(tuple_ptr->get_disk_ref_ptr(regTabPtr), &key, sizeof(Local_key));

+ ndbassert(! (disk_ptr->m_header_bits & Tuple_header::FREE));
copy_bits |= Tuple_header:ISK_PART;
}


--- 1.74/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2005-09-05 21:01:21 +02:00
+++ 1.75/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2005-09-06 10:33:32 +02:00
@@ -1240,6 +1240,7 @@

const Uint32 cnt1= regTabPtr->m_attributes[MM].m_no_of_varsize;
const Uint32 cnt2= regTabPtr->m_attributes[DD].m_no_of_varsize;
+ const Uint32 cnt3= regTabPtr->m_no_of_disk_attributes;
Uint32 *ptr= req_struct->m_tuple_ptr->get_var_part_ptr(regTabPtr);

if(cnt1)
@@ -1285,6 +1286,11 @@
4*regTabPtr->m_offsets[DD].m_null_words);
req_struct->m_tuple_ptr->m_header_bits=
Tuple_header:ISK_ALLOC | Tuple_header:ISK_INLINE;
+
+ if (cnt3)
+ {
+ req_struct->m_disk_ptr->m_header_bits = 0;
+ }
}

int Dbtup::handleInsertReq(Signal* signal,
@@ -2595,10 +2601,12 @@
dst->m_var_len_offset= 1;
dst->m_max_var_offset= ((Uint16*)src_data)[mm_vars];

+ // disk part start after varsize (aligned)
src_ptr = ALIGN_WORD(dst->m_data_ptr + dst->m_max_var_offset);
}
else
{
+ // disk part if after fixsize part...
src_ptr -= Tuple_header::HeaderSize;
}

@@ -2644,6 +2652,7 @@

Uint16 dd_tot= tabPtrP->m_no_of_disk_attributes;
Uint16 mm_vars= tabPtrP->m_attributes[MM].m_no_of_varsize;
+ Uint16 dd_vars= tabPtrP->m_attributes[DD].m_no_of_varsize;

Uint32 *dst_ptr= ptr->get_var_part_ptr(tabPtrP);
Uint16* src_off_ptr= req_struct->var_pos_array;
@@ -2669,11 +2678,27 @@
assert(dst_data_ptr <= ((char*)ptr) + 8192);
assert((UintPtr(ptr) & 3) == 0);
sizes[MM]= (dst_data_ptr + 3 - ((char*)ptr)) >> 2;
+
+ dst_ptr = ALIGN_WORD(dst_data_ptr + 3);
+ }
+ else
+ {
+ sizes[MM] = 1;
+ dst_ptr -= Tuple_header::HeaderSize;
}

if(dd_tot)
{
- abort();
+ Uint32 * src_ptr = (Uint32*)req_struct->m_disk_ptr;
+ if (unlikely(dd_vars))
+ {
+ abort();
+ }
+ else
+ {
+ sizes[DD] = 1;
+ memmove(dst_ptr, src_ptr, 4*tabPtrP->m_offsets[DD].m_fix_header_size);
+ }
}
}


--- 1.147/sql/ha_ndbcluster.cc 2005-08-27 08:12:18 +02:00
+++ 1.148/sql/ha_ndbcluster.cc 2005-09-06 10:33:32 +02:00
@@ -3806,7 +3806,7 @@
if ((my_errno= create_ndb_column(col, field, info)))
DBUG_RETURN(my_errno);

- if (info->store_on_disk)
+ if (info->store_on_disk || getenv("NDB_DEFAULT_DISK"))
col.setStorageType(NdbDictionary::Column::StorageT ypeDisk);
else
col.setStorageType(NdbDictionary::Column::StorageT ypeMemory);

--
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.