30 #line 31 "Transaction.cc"
33 :
taPtr(taPtrarg), domainid(domainidarg)
86 fieldValue.
str.length(), 0);
94 fieldValue.
str.length(), 0);
99 fprintf(
logfile,
"anomaly %i %s %i\n", fieldtype, __FILE__, __LINE__);
154 fprintf(
logfile,
"anomaly %i %s %i\n", fieldType, __FILE__, __LINE__);
205 fprintf(
logfile,
"anomaly %i %s %i\n", fieldType, __FILE__, __LINE__);
306 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
315 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
323 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
328 fprintf(
logfile,
"anomaly: %i %s %i\n",
344 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
395 size_t numhits = subtransactionCmdRef.
indexHits.size();
399 for (
size_t n = 0; n < numhits; n++)
402 push_back(subtransactionCmdRef.
indexHits[n]);
433 rowidengineid.
engineid, (
void *)msg);
437 boost::unordered_map< int64_t, vector<int64_t> > payloads;
443 payloads[rowidengineid.
engineid].push_back(rowidengineid.
rowid);
446 boost::unordered_map< int64_t, vector<int64_t> >::iterator it;
448 for (it = payloads.begin(); it != payloads.end(); it++)
460 it->first, (
void *)msg);
489 for (
size_t n=0; n < subtransactionCmdRef.
returnRows.size(); n++)
594 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
615 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
636 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
658 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
680 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
686 int64_t tacmdentrypoint, int64_t engineid,
723 printf(
"%s %i pendingcmdid %li msgrcvRef.transaction_pendingcmdid %i\n",
844 int64_t destengineid=-1;
886 fprintf(
logfile,
"anomaly %i %s %i\n", fieldtype, __FILE__,
891 destengineid, (
void *)msg);
923 int64_t rowid,
tableid, engineid;
928 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
933 rowid = it->first.
rowid;
934 tableid = it->first.tableid;
935 engineid = it->first.engineid;
944 msg->
rofs.push_back(rof);
954 int64_t rowid, int64_t tableid, int64_t engineid,
981 fprintf(
logfile,
"anomaly %i %s %i\n", changetype, __FILE__, __LINE__);
1005 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
1011 int64_t this_rowid = it->first.rowid;
1012 int64_t this_tableid = it->first.tableid;
1013 int64_t this_engineid = it->first.engineid;
1020 (
long double)0, (
string *)NULL,
1025 nodesRef.
locked.insert(deadlockNode);
1029 nodesRef.
waiting.insert(deadlockNode);
1033 boost::unordered_map< int64_t, lockFieldValue_s >::iterator it;
1042 deadlockNode.clear();
1043 long double fieldinput;
1045 sizeof(fieldinput));
1048 it->first, fieldinput,
1051 nodesRef.
locked.insert(deadlockNode);
1055 deadlockNode.clear();
1056 long double fieldinput;
1058 sizeof(fieldinput));
1061 it->first, fieldinput,
1064 nodesRef.
waiting.insert(deadlockNode);
1069 if (nodesRef.
locked.empty()==
true && nodesRef.
waiting.empty()==
true)
1074 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
1098 fieldid, (
long double)0, (
string *)NULL,
1103 long double fieldinput;
1104 memcpy(&fieldinput, &fieldVal->
value,
sizeof(fieldinput));
1281 fprintf(
logfile,
"anomaly %li %s %i\n", status, __FILE__, __LINE__);
1350 lockFieldVal.
engineid, (
void *)msg);
1374 sizeof(fieldVal.
value));
1379 printf(
"%s %i APISTATUS_UNIQUECONSTRAINT (NOLOCK)\n", __FILE__,
1393 fieldid, &fieldVal);
1400 0, fieldid, &fieldVal);
1404 printf(
"%s %i APISTATUS_UNIQUECONSTRAINT (PENDINGTOINDEXNOLOCK)\n",
1405 __FILE__, __LINE__);
1411 fprintf(
logfile,
"anomaly: %i %s %i\n",
1413 __FILE__, __LINE__);
1437 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
1482 msg->
rofs.operator [](0) = rof;
1497 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
1539 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
1540 boost::unordered_map< int64_t, class MessageCommitRollback *> msgs;
1550 rof.
tableid = it->first.tableid;
1552 switch (sRowRef.
cmd)
1558 rof.
rowid = it->first.rowid;
1560 addRof(it->first.engineid, rof, msgs);
1567 rof.
rowid = it->first.rowid;
1569 addRof(it->first.engineid, rof, msgs);
1574 for (
size_t n=0; n < tableRef.
fields.size(); n++)
1586 rof.
tableid = it->first.tableid;
1589 if (fieldValues[n].isnull==
true)
1593 rof.
rowid=it->first.rowid;
1612 rof.
rowid = it->first.rowid;
1615 switch (fieldRef.
type)
1637 rof.
rowid = it->first.rowid;
1639 addRof(it->first.engineid, rof, msgs);
1644 for (
size_t n=0; n < tableRef.
fields.size(); n++)
1656 rof.
tableid = it->first.tableid;
1661 rof.
rowid = it->first.rowid;
1663 if (fieldValues[n].isnull==
true)
1673 switch (fieldRef.
type)
1698 rof.
rowid = it->first.rowid;
1699 addRof(it->first.engineid, rof, msgs);
1701 vector <fieldValue_s> originalFieldValues;
1703 &originalFieldValues);
1704 vector <fieldValue_s> newFieldValues;
1707 for (
size_t n=0; n < tableRef.
fields.size(); n++)
1717 if ((originalFieldValues[n].value.floating !=
1718 newFieldValues[n].value.floating) ||
1719 (originalFieldValues[n].isnull !=
1720 newFieldValues[n].isnull) ||
1721 (originalFieldValues[n].str !=
1722 newFieldValues[n].str))
1727 rof.
tableid = it->first.tableid;
1731 if (newFieldValues[n].isnull==
true)
1756 switch (fieldRef.
type)
1776 rof.
tableid = it->first.tableid;
1783 if (originalFieldValues[n].isnull==
true)
1792 rof.
fieldVal = originalFieldValues[n];
1794 switch (fieldRef.
type)
1819 rof.
rowid = it->first.rowid;
1830 vector <fieldValue_s> originalFieldValues;
1832 &originalFieldValues);
1833 vector <fieldValue_s> newFieldValues;
1836 for (
size_t n=0; n < tableRef.
fields.size(); n++)
1845 if ((originalFieldValues[n].value.floating !=
1846 newFieldValues[n].value.floating) ||
1847 (originalFieldValues[n].isnull !=
1848 newFieldValues[n].isnull) ||
1849 (originalFieldValues[n].str != newFieldValues[n].str))
1854 rof.
tableid = it->first.tableid;
1857 if (newFieldValues[n].isnull==
true)
1885 switch (fieldRef.
type)
1905 rof.
tableid = it->first.tableid;
1912 if (originalFieldValues[n].isnull==
true)
1921 rof.
fieldVal = originalFieldValues[n];
1924 switch (fieldRef.
type)
1944 rof.
tableid = it->first.tableid;
1946 rof.
fieldVal = originalFieldValues[n];
1965 switch (fieldRef.
type)
1989 fprintf(
logfile,
"anomaly: %i %s %i\n", sRowRef.
cmd, __FILE__,
1995 boost::unordered_map< int64_t, class MessageCommitRollback *>::iterator
2008 for (msgsIt = msgs.begin(); msgsIt != msgs.end(); msgsIt++)
2011 (
void *)msgsIt->second);
2025 boost::unordered_map<int64_t,
2032 it->first, (
void *)it->second);
2052 boost::unordered_map<int64_t, int64_t>::iterator it;
2062 printf(
"%s %i anomaly %li %i\n", __FILE__, __LINE__, it->first,
2082 fprintf(
logfile,
"anomaly: %lu %s %i\n", entrypoint, __FILE__, __LINE__);
2088 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
2097 rof.
tableid = it->first.tableid;
2106 msg->
rofs.push_back(rof);
2112 rof.
rowid = it->first.rowid;
2115 msg->
rofs.push_back(rof);
2117 it->first.engineid, (
void *)msg);
2124 boost::unordered_map< int64_t, lockFieldValue_s >::iterator itIndices;
2126 for (itIndices = it->second.uniqueIndices.begin();
2127 itIndices != it->second.uniqueIndices.end(); itIndices++)
2129 rof.
fieldid = itIndices->first;
2130 rof.
fieldVal = itIndices->second.fieldVal;
2133 msg->
rofs.push_back(rof);
2135 itIndices->second.engineid, (
void *)msg);
2140 boost::unordered_map<int64_t, int64_t>::iterator itEngines;
2181 msg->
rofs.push_back(rof);
2189 msg->
rofs.push_back(rof);
2197 boost::unordered_map< int64_t, lockFieldValue_s >::iterator it;
2203 rof.
fieldVal = it->second.fieldVal;
2206 msg->
rofs.push_back(rof);
2208 it->second.engineid, (
void *)msg);
2288 printf(
"Transaction bad message stub %s %i\n", __FILE__, __LINE__);
2450 boost::unordered_map< int64_t,
2453 if (!msgs.count(engineid))
2458 msgs[engineid]->
rofs.push_back(rof);
2473 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
2518 string &leftoperand,
string &rightoperand,
2520 vector<fieldValue_s> &inValues,
2521 void *continuationData,
2522 boost::unordered_map<uuRecord_s, returnRow_s>
2544 string *fieldidoperand;
2548 fieldidoperand=&rightoperand;
2552 fieldidoperand=&leftoperand;
2555 string &fieldidoperandRef=*fieldidoperand;
2559 printf(
"%s %i operand is not fieldid, it is %c\n", __FILE__, __LINE__,
2560 fieldidoperandRef[0]);
2563 printf(
"%s %i identifier: %s\n", __FILE__, __LINE__,
2564 fieldidoperandRef.substr(1, string::npos).c_str());
2571 memcpy(&fieldid, &fieldidoperandRef[1],
sizeof(fieldid));
2582 switch (rightoperand[0])
2587 memcpy(&len, &rightoperand[1],
sizeof(len));
2591 searchParams.
values[0].value.character =
2592 rightoperand[1+
sizeof(int64_t)];
2593 searchParams.
values[1].value.character =
2594 rightoperand[1+
sizeof(int64_t)+len];
2598 searchParams.
values[0].str.resize(len, (
char)0);
2599 searchParams.
values[1].str.resize(rightoperand.size()-
2600 (1+
sizeof(len)+len), (char)0);
2601 memcpy(&searchParams.
values[0].str[0],
2602 &rightoperand[1+
sizeof(len)], len);
2603 memcpy(&searchParams.
values[1].str[0],
2604 &rightoperand[1+
sizeof(len)+len],
2605 searchParams.
values[1].str.size());
2611 memcpy(&searchParams.
values[0].value.integer,
2612 &rightoperand[1],
sizeof(int64_t));
2613 memcpy(&searchParams.
values[1].value.integer,
2614 &rightoperand[1+
sizeof(int64_t)],
sizeof(int64_t));
2618 memcpy(&searchParams.
values[0].value.floating,
2619 &rightoperand[1],
sizeof(
long double));
2620 memcpy(&searchParams.
values[1].value.floating,
2621 &rightoperand[1+
sizeof(
long double)],
sizeof(
long double));
2625 printf(
"%s %i operand type %c not supported on rhs of predicate.\n",
2626 __FILE__, __LINE__, rightoperand[0]);
2636 switch (rightoperand[0])
2641 memcpy(&len, &rightoperand[1],
sizeof(len));
2645 searchParams.
values[0].value.character =
2646 rightoperand[1+
sizeof(int64_t)];
2647 searchParams.
values[1].value.character =
2648 rightoperand[1+
sizeof(int64_t)+len];
2652 searchParams.
values[0].str =
2653 rightoperand.substr(1+
sizeof(len), len);
2654 searchParams.
values[1].str =
2655 rightoperand.substr(1+
sizeof(len)+len, string::npos);
2661 memcpy(&searchParams.
values[0].value.integer,
2662 &rightoperand[1],
sizeof(int64_t));
2663 memcpy(&searchParams.
values[1].value.integer,
2664 &rightoperand[1+
sizeof(int64_t)],
sizeof(int64_t));
2668 memcpy(&searchParams.
values[0].value.floating,
2669 &rightoperand[1],
sizeof(
long double));
2670 memcpy(&searchParams.
values[1].value.floating,
2671 &rightoperand[1+
sizeof(
long double)],
sizeof(
long double));
2675 printf(
"%s %i operand type %c not supported on rhs of predicate.\n",
2676 __FILE__, __LINE__, rightoperand[0]);
2684 searchParams.
values = inValues;
2690 searchParams.
values = inValues;
2706 switch (rightoperand[0])
2711 searchParams.
values[0].value.character = rightoperand[1];
2715 searchParams.
values[0].str =
2716 rightoperand.substr(1, string::npos);
2722 memcpy(&searchParams.
values[0].value.integer, &rightoperand[1],
2727 if (rightoperand[1]==
't')
2729 searchParams.
values[0].value.boolean=
true;
2733 searchParams.
values[0].value.boolean=
false;
2739 memcpy(&searchParams.
values[0].value.floating, &rightoperand[1],
2740 sizeof(
long double));
2744 printf(
"%s %i operand type %c not supported on rhs of predicate.\n",
2745 __FILE__, __LINE__, rightoperand[0]);
2755 volatile int64_t destengineid = -1;
2796 printf(
"%s %i anomaly %i\n", __FILE__, __LINE__, fieldtype);
2808 searchParams.
op = op;
2819 searchParams.
op = op;
2830 searchParams.
op = op;
2908 boost::unordered_map< int64_t, vector<int64_t> > payloads;
2917 boost::unordered_map< int64_t, vector<int64_t> >::iterator it;
2919 for (it = payloads.begin(); it != payloads.end(); it++)
2925 msg->
rowids = it->second;
2927 it->first, (
void *)msg);
2936 boost::unordered_map<uuRecord_s, returnRow_s> &resultsRef =
2942 bool islockchange =
false;
2944 for (
size_t n=0; n < subtransactionCmdRef.
returnRows.size(); n++)
2990 __FILE__, __LINE__);
2994 resultsRef[uur] = returnrowRef;
2997 if (islockchange==
false)
3032 printf(
"%s %i anomaly %i\n", __FILE__, __LINE__,
pendingcmd);
3039 printf(
"%s %i anomaly %li\n", __FILE__, __LINE__, entrypoint);
3133 class Table &tableRef =
3136 for (
size_t n=0; n < tableRef.
fields.size(); n++)
3139 if (tableRef.
fields[n].index.isunique !=
true ||
3196 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
3202 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
3208 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
3213 fprintf(
logfile,
"anomaly: %i %s %i\n",
3227 printf(
"%s %i anomaly %li\n", __FILE__, __LINE__, entrypoint);
3246 printf(
"%s %i APISTATUS_UNIQUECONSTRAINT (NOLOCK)\n", __FILE__,
3271 printf(
"%s %i locktype %i\n", __FILE__, __LINE__,
3319 class Table &tableRef =
3324 for (
size_t n=0; n < fieldValues.size(); n++)
3344 lockFieldValue.
fieldVal = fieldValues[n];
3395 printf(
"%s %i locktype %i\n", __FILE__, __LINE__,
3412 printf(
"%s %i anomaly %li\n", __FILE__, __LINE__, entrypoint);
3419 int64_t rowid, int64_t tableid, int64_t engineid,
3446 fprintf(
logfile,
"anomaly %i %s %i\n", changetype, __FILE__, __LINE__);
3470 boost::unordered_map< uuRecord_s, stagedRow_s >::iterator it;
3476 int64_t this_rowid = it->first.rowid;
3477 int64_t this_tableid = it->first.tableid;
3478 int64_t this_engineid = it->first.engineid;
3485 (
long double)0, (
string *)NULL,
3490 nodesRef.
locked.insert(deadlockNode);
3494 nodesRef.
waiting.insert(deadlockNode);
3498 boost::unordered_map< int64_t, lockFieldValue_s >::iterator it;
3507 deadlockNode.clear();
3508 long double fieldinput;
3510 sizeof(fieldinput));
3513 it->first, fieldinput,
3516 nodesRef.
locked.insert(deadlockNode);
3520 deadlockNode.clear();
3521 long double fieldinput;
3523 sizeof(fieldinput));
3526 it->first, fieldinput,
3529 nodesRef.
waiting.insert(deadlockNode);
3534 if (nodesRef.
locked.empty()==
true && nodesRef.
waiting.empty()==
true)
3538 fprintf(
logfile,
"anomaly: %s %i\n", __FILE__, __LINE__);
3562 fieldid, (
long double)0, (
string *)NULL,
3567 long double fieldinput;
3568 memcpy(&fieldinput, &fieldVal->
value,
sizeof(fieldinput));