int nSoftAbortAbort = 0;
#endif
+#ifdef STMDEBUG
+#define DEBUGSTM(x...) printf(x);
+#else
+#define DEBUGSTM(x...)
+#endif
+
/* ==================================================
* stmStartup
} else {
oidwrlocked[numoidwrlocked++] = OID(header);
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
softabort=1;
} else {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
}
} else {
oidrdlocked[numoidrdlocked++] = OID(header);
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
softabort=1;
} else {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
}
/* Decide the final response */
if (softabort) {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("Softabort\n");
return TRANS_SOFT_ABORT;
} else {
transCommitProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("Commit\n");
return TRANS_COMMIT;
}
}
} else {
oidwrlocked[numoidwrlocked++] = OID(header);
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
softabort=1;
} else {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("WR Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
}
} else {
oidrdlocked[numoidrdlocked++] = OID(header);
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
} else { /* cannot aquire lock */
softabort=1;
} else {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("RD Abort: rd: %u wr: %u tot: %u type: %u ver: %u\n", numoidrdlocked, numoidwrlocked, c_numelements, TYPE(header), header->version);
return TRANS_ABORT;
}
}
/* Decide the final response */
if (softabort) {
transAbortProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("Softabort\n");
return TRANS_SOFT_ABORT;
} else {
transCommitProcess(oidrdlocked, &numoidrdlocked, oidwrlocked, &numoidwrlocked);
+ DEBUGSTM("Commit\n");
return TRANS_COMMIT;
}
}