int userId, String userIp, String userText,
int revisionId, String revComment, int revMinorEdit) {
boolean adv;
VoltTable rs[] = null;
final TimestampType timestamp = new TimestampType();
// Get the next id from the PAGE
voltQueueSQL(selectLastPageRevision, pageId);
rs = voltExecuteSQL();
int nextId = (int)rs[0].asScalarLong() + 1;
// INSERT NEW TEXT
voltQueueSQL(insertText, nextId, pageId, pageText, "utf-8");
rs = voltExecuteSQL();
adv = rs[0].advanceRow();
assert(adv) : "Problem inserting new tuples in table text";
int nextTextId = (int)rs[0].getLong(0);
// INSERT NEW REVISION
voltQueueSQL(insertRevision, nextId,
pageId,
nextTextId,
revComment,
revMinorEdit,
userId,
userText,
timestamp,
0,
pageText.length(),
revisionId);
rs = voltExecuteSQL();
adv = rs[0].advanceRow();
// I'm removing AND page_latest = "+a.revisionId+" from the query, since
// it creates sometimes problem with the data, and page_id is a PK
// anyway
voltQueueSQL(updatePage, timestamp, pageText.length(), pageId);
voltQueueSQL(insertRecentChanges, nextId,
timestamp,
new TimestampType(),
pageNamespace,
pageId,
0,
0,
pageId,