change the 2 executions in archiveDocRevision()with 1 statement:"insert into xml_revisionsselect ... from xml_documents where docid = ..."
change the 2 executions in archiveDocRevision()
with 1 statement:
"insert into xml_revisions
select ... from xml_documents where docid = ..."