Commit 5e14c3cd authored by unknown's avatar unknown

Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb


storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  Auto merged
parents f243df04 2df58d26
...@@ -1386,6 +1386,7 @@ Dblqh::sendAddFragReq(Signal* signal) ...@@ -1386,6 +1386,7 @@ Dblqh::sendAddFragReq(Signal* signal)
tupFragReq->noOfCharsets = addfragptr.p->noOfCharsets; tupFragReq->noOfCharsets = addfragptr.p->noOfCharsets;
tupFragReq->checksumIndicator = addfragptr.p->checksumIndicator; tupFragReq->checksumIndicator = addfragptr.p->checksumIndicator;
tupFragReq->globalCheckpointIdIndicator = addfragptr.p->GCPIndicator; tupFragReq->globalCheckpointIdIndicator = addfragptr.p->GCPIndicator;
tupFragReq->forceVarPartFlag = addfragptr.p->forceVarPartFlag;
sendSignal(fragptr.p->tupBlockref, GSN_TUPFRAGREQ, sendSignal(fragptr.p->tupBlockref, GSN_TUPFRAGREQ,
signal, TupFragReq::SignalLength, JBB); signal, TupFragReq::SignalLength, JBB);
return; return;
......
...@@ -980,7 +980,8 @@ ArrayPool<TupTriggerData> c_triggerPool; ...@@ -980,7 +980,8 @@ ArrayPool<TupTriggerData> c_triggerPool;
enum Bits enum Bits
{ {
TR_Checksum = 0x1, // Need to be 1 TR_Checksum = 0x1, // Need to be 1
TR_RowGCI = 0x2 TR_RowGCI = 0x2,
TR_ForceVarPart = 0x4
}; };
Uint16 m_bits; Uint16 m_bits;
Uint16 total_rec_size; // Max total size for entire tuple in words Uint16 total_rec_size; // Max total size for entire tuple in words
......
...@@ -1105,7 +1105,14 @@ Dbtup::prepare_initial_insert(KeyReqStruct *req_struct, ...@@ -1105,7 +1105,14 @@ Dbtup::prepare_initial_insert(KeyReqStruct *req_struct,
const Uint32 cnt1= regTabPtr->m_attributes[MM].m_no_of_varsize; const Uint32 cnt1= regTabPtr->m_attributes[MM].m_no_of_varsize;
const Uint32 cnt2= regTabPtr->m_attributes[DD].m_no_of_varsize; const Uint32 cnt2= regTabPtr->m_attributes[DD].m_no_of_varsize;
Uint32 *ptr= req_struct->m_tuple_ptr->get_end_of_fix_part_ptr(regTabPtr); Uint32 *ptr= req_struct->m_tuple_ptr->get_end_of_fix_part_ptr(regTabPtr);
Var_part_ref* ref = req_struct->m_tuple_ptr->get_var_part_ref_ptr(regTabPtr);
if (regTabPtr->m_bits & Tablerec::TR_ForceVarPart)
{
ref->m_page_no = RNIL;
ref->m_page_idx = Tup_varsize_page::END_OF_FREE_LIST;
}
if(cnt1) if(cnt1)
{ {
KeyReqStruct::Var_data* dst= &req_struct->m_var_data[MM]; KeyReqStruct::Var_data* dst= &req_struct->m_var_data[MM];
......
...@@ -58,6 +58,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal) ...@@ -58,6 +58,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
Uint32 checksumIndicator = tupFragReq->checksumIndicator; Uint32 checksumIndicator = tupFragReq->checksumIndicator;
Uint32 gcpIndicator = tupFragReq->globalCheckpointIdIndicator; Uint32 gcpIndicator = tupFragReq->globalCheckpointIdIndicator;
Uint32 tablespace_id= tupFragReq->tablespaceid; Uint32 tablespace_id= tupFragReq->tablespaceid;
Uint32 forceVarPart = tupFragReq->forceVarPartFlag;
Uint64 maxRows = Uint64 maxRows =
(((Uint64)tupFragReq->maxRowsHigh) << 32) + tupFragReq->maxRowsLow; (((Uint64)tupFragReq->maxRowsHigh) << 32) + tupFragReq->maxRowsLow;
...@@ -172,6 +173,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal) ...@@ -172,6 +173,7 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
regTabPtr.p->m_bits = 0; regTabPtr.p->m_bits = 0;
regTabPtr.p->m_bits |= (checksumIndicator ? Tablerec::TR_Checksum : 0); regTabPtr.p->m_bits |= (checksumIndicator ? Tablerec::TR_Checksum : 0);
regTabPtr.p->m_bits |= (gcpIndicator ? Tablerec::TR_RowGCI : 0); regTabPtr.p->m_bits |= (gcpIndicator ? Tablerec::TR_RowGCI : 0);
regTabPtr.p->m_bits |= (forceVarPart ? Tablerec::TR_ForceVarPart : 0);
regTabPtr.p->m_offsets[MM].m_disk_ref_offset= 0; regTabPtr.p->m_offsets[MM].m_disk_ref_offset= 0;
regTabPtr.p->m_offsets[MM].m_null_words= 0; regTabPtr.p->m_offsets[MM].m_null_words= 0;
...@@ -474,6 +476,11 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* signal) ...@@ -474,6 +476,11 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* signal)
} }
if (regTabPtr.p->m_attributes[MM].m_no_of_varsize) if (regTabPtr.p->m_attributes[MM].m_no_of_varsize)
{
pos[MM] += Var_part_ref::SZ32;
regTabPtr.p->m_bits &= ~(Uint32)Tablerec::TR_ForceVarPart;
}
else if (regTabPtr.p->m_bits & Tablerec::TR_ForceVarPart)
{ {
pos[MM] += Var_part_ref::SZ32; pos[MM] += Var_part_ref::SZ32;
} }
......
...@@ -971,11 +971,19 @@ NDBT_Tables::createTable(Ndb* pNdb, const char* _name, bool _temp, ...@@ -971,11 +971,19 @@ NDBT_Tables::createTable(Ndb* pNdb, const char* _name, bool _temp,
"that NDBT_Tables can create!" << endl; "that NDBT_Tables can create!" << endl;
return NDBT_WRONGARGS; return NDBT_WRONGARGS;
} }
Uint32 sum = 0;
for (Uint32 i = 0; i<strlen(_name); i++)
sum += 33 * sum + (Uint32)_name[i];
bool forceVarPart = (sum & 1);
int r = 0; int r = 0;
do { do {
NdbDictionary::Table tmpTab(* tab); NdbDictionary::Table tmpTab(* tab);
tmpTab.setStoredTable(_temp ? 0 : 1); tmpTab.setStoredTable(_temp ? 0 : 1);
tmpTab.setForceVarPart(forceVarPart);
{ {
NdbError error; NdbError error;
int ret = tmpTab.validate(error); int ret = tmpTab.validate(error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment