#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped
4412 Jonas Oreland 2011-05-25
ndb - mttc - increase obfuscation by passing an EmulatedJamBuffer* in signal->theData for DIGETNODESREQ and DIVERIFYREQ. This to allow these two signals to be called from different threads (execute direct)
modified:
storage/ndb/include/kernel/signaldata/DiGetNodes.hpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
=== modified file 'storage/ndb/include/kernel/signaldata/DiGetNodes.hpp'
--- a/storage/ndb/include/kernel/signaldata/DiGetNodes.hpp 2011-02-08 13:55:54 +0000
+++ b/storage/ndb/include/kernel/signaldata/DiGetNodes.hpp 2011-05-25 06:58:00 +0000
@@ -58,10 +58,13 @@ class DiGetNodesReq {
*/
friend class Dbdih;
public:
- STATIC_CONST( SignalLength = 3 );
+ STATIC_CONST( SignalLength = 4 + (sizeof(void*) / sizeof(Uint32)) );
private:
Uint32 tableId;
Uint32 hashValue;
Uint32 distr_key_indicator;
+ Uint32 unused;
+ Uint32 jamBuffer[2];
};
+
#endif
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2011-05-18 10:48:58 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2011-05-25 06:58:00 +0000
@@ -9004,7 +9004,7 @@ void Dbdih::execDIGETNODESREQ(Signal* si
Uint32 fragId, newFragId = RNIL;
DiGetNodesConf * const conf = (DiGetNodesConf *)&signal->theData[0];
TabRecord* regTabDesc = tabRecord;
- EmulatedJamBuffer * jambuf = jamBuffer();
+ EmulatedJamBuffer * jambuf = * (EmulatedJamBuffer**)(req->jamBuffer);
thrjamEntry(jambuf);
ptrCheckGuard(tabPtr, ttabFileSize, regTabDesc);
@@ -9273,7 +9273,7 @@ Dbdih::dequeue(DIVERIFY_queue & q, Ptr<A
*/
void Dbdih::execDIVERIFYREQ(Signal* signal)
{
- EmulatedJamBuffer * jambuf = jamBuffer();
+ EmulatedJamBuffer * jambuf = * (EmulatedJamBuffer**)(signal->theData+2);
thrjamEntry(jambuf);
if ((getBlockCommit() == false) &&
isEmpty(c_diverify_queue[0]))
=== modified file 'storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp 2011-05-13 08:38:01 +0000
+++ b/storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp 2011-05-25 06:58:00 +0000
@@ -3682,6 +3682,7 @@ Dbspj::getNodes(Signal* signal, BuildKey
req->tableId = tableId;
req->hashValue = dst.hashInfo[1];
req->distr_key_indicator = 0; // userDefinedPartitioning not supported!
+ * (EmulatedJamBuffer**)req->jamBuffer = jamBuffer();
#if 1
EXECUTE_DIRECT(DBDIH, GSN_DIGETNODESREQ, signal,
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2011-05-03 13:48:54 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2011-05-25 06:58:00 +0000
@@ -3188,6 +3188,7 @@ void Dbtc::tckeyreq050Lab(Signal* signal
req->tableId = Ttableref;
req->hashValue = TdistrHashValue;
req->distr_key_indicator = regCachePtr->distributionKeyIndicator;
+ * (EmulatedJamBuffer**)req->jamBuffer = jamBuffer();
/*-------------------------------------------------------------*/
/* FOR EFFICIENCY REASONS WE AVOID THE SIGNAL SENDING HERE AND */
@@ -4878,7 +4879,9 @@ void Dbtc::diverify010Lab(Signal* signal
* CONNECTIONS AND THEN WHEN ALL DIVERIFYCONF HAVE BEEN RECEIVED THE
* COMMIT MESSAGE CAN BE SENT TO ALL INVOLVED PARTS.
*---------------------------------------------------------------------*/
- EXECUTE_DIRECT(DBDIH, GSN_DIVERIFYREQ, signal, 1);
+ * (EmulatedJamBuffer**)(signal->theData+2) = jamBuffer();
+ EXECUTE_DIRECT(DBDIH, GSN_DIVERIFYREQ, signal,
+ 2 + sizeof(void*)/sizeof(Uint32));
if (signal->theData[3] == 0) {
execDIVERIFYCONF(signal);
}
@@ -10871,7 +10874,7 @@ void Dbtc::execDIH_SCAN_TAB_CONF(Signal*
req->tableId = tabPtr.i;
req->hashValue = cachePtr.p->distributionKey;
req->distr_key_indicator = tabPtr.p->get_user_defined_partitioning();
-
+ * (EmulatedJamBuffer**)req->jamBuffer = jamBuffer();
EXECUTE_DIRECT(DBDIH, GSN_DIGETNODESREQ, signal,
DiGetNodesReq::SignalLength);
UintR TerrorIndicator = signal->theData[0];
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110525065800-mkwx9s5fs0bvr5wf.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (jonas:4412) | Jonas Oreland | 25 May |