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.2048 05/10/14 14:28:50 jonas@stripped +5 -0
ndb dd -
fix detached triggers + event handling
storage/ndb/test/src/NDBT_ResultRow.cpp
1.17 05/10/14 14:28:46 jonas@stripped +10 -1
Fix compare of varsize records
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
1.23 05/10/14 14:28:46 jonas@stripped +6 -6
use byte size in receive
storage/ndb/src/kernel/blocks/suma/Suma.cpp
1.27 05/10/14 14:28:46 jonas@stripped +1 -1
Monitor all replicas for deletes
storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
1.27 05/10/14 14:28:46 jonas@stripped +20 -5
setup tuple pointers for detached triggers
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
1.88 05/10/14 14:28:46 jonas@stripped +2 -0
save change mask, when setting state USE_SAVED
# 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: perch.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.1-ndb-dd
--- 1.87/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2005-10-10 14:35:20 +02:00
+++ 1.88/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2005-10-14 14:28:46 +02:00
@@ -2649,6 +2649,8 @@
//Save change mask
if (req_struct->max_attr_id_updated == 0) {
set_change_mask_state(regOperPtr, USE_SAVED_CHANGE_MASK);
+ memcpy(regOperPtr->saved_change_mask, &req_struct->changeMask,
+ sizeof(regOperPtr->saved_change_mask));
} else {
if (req_struct->no_changed_attrs < 16) {
set_change_mask_state(regOperPtr, RECALCULATE_CHANGE_MASK);
--- 1.26/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp 2005-10-10 14:35:20 +02:00
+++ 1.27/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp 2005-10-14 14:28:46 +02:00
@@ -472,9 +472,9 @@
// Execute any after delete triggers by sending
// FIRETRIGORD with the before tuple
- executeTriggers(req_struct,
- regTablePtr->subscriptionDeleteTriggers,
- regOperPtr);
+ fireDetachedTriggers(req_struct,
+ regTablePtr->subscriptionDeleteTriggers,
+ regOperPtr);
break;
case(ZUPDATE):
ljam();
@@ -544,7 +544,19 @@
ArrayList<TupTriggerData>& triggerList,
Operationrec* const regOperPtr)
{
+
+ TriggerPtr trigPtr;
Uint32 save= regOperPtr->op_struct.op_type;
+ Tuple_header *save_ptr = req_struct->m_tuple_ptr;
+
+ switch(save){
+ case ZUPDATE:
+ case ZINSERT:
+ req_struct->m_tuple_ptr = (Tuple_header*)
+ c_undo_buffer.get_ptr(®OperPtr->m_copy_tuple_location);
+ break;
+ }
+
/**
* Set correct operation type and fix change mask
*/
@@ -555,11 +567,12 @@
// insert + delete = nothing
ljam();
return;
+ goto end;
}
regOperPtr->op_struct.op_type = ZINSERT;
}
-
- TriggerPtr trigPtr;
+
+ ndbrequire(regOperPtr->is_first_operation());
triggerList.first(trigPtr);
while (trigPtr.i != RNIL) {
ljam();
@@ -575,7 +588,9 @@
triggerList.next(trigPtr);
}
+end:
regOperPtr->op_struct.op_type = save;
+ req_struct->m_tuple_ptr = save_ptr;
}
void Dbtup::executeTriggers(KeyReqStruct *req_struct,
--- 1.26/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2005-10-11 14:08:11 +02:00
+++ 1.27/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2005-10-14 14:28:46 +02:00
@@ -2519,7 +2519,7 @@
req->setTriggerType(TriggerType::SUBSCRIPTION_BEFORE);
req->setTriggerActionTime(TriggerActionTime::TA_DETACHED);
req->setMonitorReplicas(true);
- req->setMonitorAllAttributes(false);
+ req->setMonitorAllAttributes(j == TriggerEvent::TE_DELETE);
req->setReceiverRef(SUMA_REF);
req->setTriggerId(triggerId);
req->setTriggerEvent((TriggerEvent::Value)j);
--- 1.22/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2005-09-16 17:44:30 +02:00
+++ 1.23/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp 2005-10-14 14:28:46 +02:00
@@ -371,7 +371,7 @@
while(tAttr)
{
assert(aAttrPtr < aAttrEndPtr);
- unsigned tDataSz= AttributeHeader(*aAttrPtr).getDataSize();
+ unsigned tDataSz= AttributeHeader(*aAttrPtr).getByteSize();
assert(tAttr->attrId() ==
AttributeHeader(*aAttrPtr).getAttributeId());
receive_data(tAttr, aDataPtr, tDataSz);
@@ -382,7 +382,7 @@
}
// next
aAttrPtr++;
- aDataPtr+= tDataSz;
+ aDataPtr+= (tDataSz + 3) >> 2;
tAttr= tAttr->next();
}
}
@@ -396,7 +396,7 @@
while ((aAttrPtr < aAttrEndPtr) && (tWorkingRecAttr != NULL)) {
tRecAttrId = tWorkingRecAttr->attrId();
tAttrId = AttributeHeader(*aAttrPtr).getAttributeId();
- tDataSz = AttributeHeader(*aAttrPtr).getDataSize();
+ tDataSz = AttributeHeader(*aAttrPtr).getByteSize();
while (tAttrId > tRecAttrId) {
DBUG_PRINT("info",("undef [%u] %u 0x%x [%u] 0x%x",
@@ -420,7 +420,7 @@
tWorkingRecAttr = tWorkingRecAttr->next();
}
aAttrPtr++;
- aDataPtr += tDataSz;
+ aDataPtr += (tDataSz + 3) >> 2;
}
while (tWorkingRecAttr != NULL) {
@@ -437,7 +437,7 @@
while ((aDataPtr < aDataEndPtr) && (tWorkingRecAttr != NULL)) {
tRecAttrId = tWorkingRecAttr->attrId();
tAttrId = AttributeHeader(*aDataPtr).getAttributeId();
- tDataSz = AttributeHeader(*aDataPtr).getDataSize();
+ tDataSz = AttributeHeader(*aDataPtr).getByteSize();
aDataPtr++;
while (tAttrId > tRecAttrId) {
tWorkingRecAttr->setUNDEFINED();
@@ -455,7 +455,7 @@
receive_data(tWorkingRecAttr, aDataPtr, tDataSz);
tWorkingRecAttr = tWorkingRecAttr->next();
}
- aDataPtr += tDataSz;
+ aDataPtr += (tDataSz + 3) >> 2;
}
while (tWorkingRecAttr != NULL) {
tWorkingRecAttr->setUNDEFINED();
--- 1.16/storage/ndb/test/src/NDBT_ResultRow.cpp 2005-09-16 17:06:46 +02:00
+++ 1.17/storage/ndb/test/src/NDBT_ResultRow.cpp 2005-10-14 14:28:46 +02:00
@@ -98,7 +98,16 @@
Uint32 sizeInBytes = data[i]->get_size_in_bytes();
for (Uint32 j = 0; j < sizeInBytes; j+=(sizeof(Uint32))){
str.append("H'");
- sprintf(buf, "%.8x", *p);
+ if (j + 4 < sizeInBytes)
+ {
+ sprintf(buf, "%.8x", *p);
+ }
+ else
+ {
+ Uint32 tmp = 0;
+ memcpy(&tmp, p, sizeInBytes - j);
+ sprintf(buf, "%.8x", tmp);
+ }
p++;
str.append(buf);
if ((j + sizeof(Uint32)) < sizeInBytes)
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2048) | jonas | 14 Oct |