"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/TransactionManagerMV2PL.java" between
hsqldb-2.7.1.zip and hsqldb-2.7.2.zip

About: HSQLDB (HyperSQL DataBase) is a SQL relational database engine written in Java. It supports nearly full ANSI-92 SQL (BNF format) and full core SQL:2008.

TransactionManagerMV2PL.java  (hsqldb-2.7.1):TransactionManagerMV2PL.java  (hsqldb-2.7.2)
/* Copyright (c) 2001-2022, The HSQL Development Group /* Copyright (c) 2001-2023, The HSQL Development Group
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* *
* Redistributions of source code must retain the above copyright notice, this * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer. * list of conditions and the following disclaimer.
* *
* Redistributions in binary form must reproduce the above copyright notice, * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
skipping to change at line 43 skipping to change at line 43
import org.hsqldb.error.Error; import org.hsqldb.error.Error;
import org.hsqldb.error.ErrorCode; import org.hsqldb.error.ErrorCode;
import org.hsqldb.lib.HsqlDeque; import org.hsqldb.lib.HsqlDeque;
import org.hsqldb.lib.LongDeque; import org.hsqldb.lib.LongDeque;
import org.hsqldb.persist.PersistentStore; import org.hsqldb.persist.PersistentStore;
/** /**
* Manages rows involved in transactions * Manages rows involved in transactions
* *
* @author Fred Toussi (fredt@users dot sourceforge.net) * @author Fred Toussi (fredt@users dot sourceforge.net)
* @version 2.7.0 * @version 2.7.2
* @since 2.0.0 * @since 2.0.0
*/ */
public class TransactionManagerMV2PL extends TransactionManagerCommon public class TransactionManagerMV2PL extends TransactionManagerCommon
implements TransactionManager { implements TransactionManager {
// functional unit - merged committed transactions // functional unit - merged committed transactions
HsqlDeque committedTransactions = new HsqlDeque(); HsqlDeque committedTransactions = new HsqlDeque();
LongDeque committedTransactionSCNs = new LongDeque(); LongDeque committedTransactionSCNs = new LongDeque();
public TransactionManagerMV2PL(Database db) { public TransactionManagerMV2PL(Database db) {
skipping to change at line 416 skipping to change at line 416
writeLock.lock(); writeLock.lock();
try { try {
if (hasExpired) { if (hasExpired) {
session.redoAction = true; session.redoAction = true;
return; return;
} }
cs = updateCurrentStatement(session, cs);
if (cs == null) {
return;
}
boolean canProceed = setWaitedSessionsTPL(session, cs); boolean canProceed = setWaitedSessionsTPL(session, cs);
if (canProceed) { if (canProceed) {
session.isPreTransaction = true; session.isPreTransaction = true;
if (session.tempSet.isEmpty()) { if (session.tempSet.isEmpty()) {
lockTablesTPL(session, cs); lockTablesTPL(session, cs);
// we don't set other sessions that would now be waiting for this one too // we don't set other sessions that would now be waiting for this one too
} else { } else {
skipping to change at line 451 skipping to change at line 445
/** /**
* add session to the end of queue when a transaction starts * add session to the end of queue when a transaction starts
* (depending on isolation mode) * (depending on isolation mode)
*/ */
public void beginActionResume(Session session) { public void beginActionResume(Session session) {
writeLock.lock(); writeLock.lock();
try { try {
Statement cs = session.sessionContext.currentStatement;
cs = updateCurrentStatement(session, cs);
if (session.sessionContext.invalidStatement) {
return;
}
if (session.isTransaction) { if (session.isTransaction) {
session.actionSCN = getNextSystemChangeNumber(); session.actionSCN = getNextSystemChangeNumber();
session.actionStartSCN = session.actionSCN; session.actionStartSCN = session.actionSCN;
} else { } else {
beginTransactionCommon(session); beginTransactionCommon(session);
liveTransactionSCNs.addLast(session.transactionSCN); liveTransactionSCNs.addLast(session.transactionSCN);
} }
} finally { } finally {
writeLock.unlock(); writeLock.unlock();
} }
 End of changes. 4 change blocks. 
8 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)