4888 Jonas Oreland 2012-03-14
ndb - change order in which "next-step" is decided when receiving LQHKEYCONF. This change is a no-op until triggers can cause triggers to fire...i.e FK...also document the if-statements to make them clearer
modified:
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
4887 Jonas Oreland 2012-03-14
ndb - add extra arguments (yet unused) to Dbtc::trigger_op_finished. To be used by FK
modified:
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2012-03-14 10:00:46 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2012-03-14 11:04:02 +0000
@@ -4516,31 +4516,20 @@ void Dbtc::execLQHKEYCONF(Signal* signal
/**
* And now decide what to do next
+ * 1) First check if there are fired triggers
+ * 2) Then check if it's a index-table read
+ * 3) Then check if op was created by trigger
+ * 4) Else it's a normal op
+ *
+ * - trigger op, can cause new trigger ops (cascade)
+ * - trigger op can be using uk
*/
- if (regTcPtr->triggeringOperation != RNIL)
+ if (noFired)
{
- jam();
- // This operation was created by a trigger execting operation
- // Restart it if we have executed all it's triggers
- TcConnectRecordPtr opPtr;
-
- opPtr.i = regTcPtr->triggeringOperation;
- ptrCheckGuard(opPtr, ctcConnectFilesize, localTcConnectRecord);
- trigger_op_finished(signal, regApiPtr, regTcPtr->currentTriggerId,
- opPtr.p, 0);
- } else if (noFired == 0) {
- // This operation did not fire any triggers, finish operation
- jam();
- if (regTcPtr->isIndexOp(regTcPtr->m_special_op_flags)) {
- jam();
- setupIndexOpReturn(regApiPtr.p, regTcPtr);
- }
- lqhKeyConf_checkTransactionState(signal, regApiPtr);
- } else {
// We have fired triggers
jam();
saveTriggeringOpState(signal, regTcPtr);
- if (regTcPtr->noReceivedTriggers == noFired)
+ if (regTcPtr->noReceivedTriggers == noFired)
{
// We have received all data
jam();
@@ -4548,6 +4537,31 @@ void Dbtc::execLQHKEYCONF(Signal* signal
}
// else wait for more trigger data
}
+ else if (regTcPtr->isIndexOp(regTcPtr->m_special_op_flags))
+ {
+ // This is a index-table read
+ jam();
+ setupIndexOpReturn(regApiPtr.p, regTcPtr);
+ lqhKeyConf_checkTransactionState(signal, regApiPtr);
+ }
+ else if (regTcPtr->triggeringOperation == RNIL)
+ {
+ // This is "normal" path
+ jam();
+ lqhKeyConf_checkTransactionState(signal, regApiPtr);
+ }
+ else
+ {
+ jam();
+ // This operation was created by a trigger execting operation
+ // Restart it if we have executed all it's triggers
+ TcConnectRecordPtr opPtr;
+
+ opPtr.i = regTcPtr->triggeringOperation;
+ ptrCheckGuard(opPtr, ctcConnectFilesize, localTcConnectRecord);
+ trigger_op_finished(signal, regApiPtr, regTcPtr->currentTriggerId,
+ opPtr.p, 0);
+ }
}//Dbtc::execLQHKEYCONF()
void Dbtc::setupIndexOpReturn(ApiConnectRecord* regApiPtr,
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4887 to 4888) | Jonas Oreland | 14 Mar |