"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hsqldb/src/org/hsqldb/TransactionManager2PL.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.

TransactionManager2PL.java  (hsqldb-2.7.1):TransactionManager2PL.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 41 skipping to change at line 41
package org.hsqldb; package org.hsqldb;
import org.hsqldb.error.Error; import org.hsqldb.error.Error;
import org.hsqldb.error.ErrorCode; import org.hsqldb.error.ErrorCode;
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 TransactionManager2PL extends TransactionManagerCommon public class TransactionManager2PL extends TransactionManagerCommon
implements TransactionManager { implements TransactionManager {
public TransactionManager2PL(Database db) { public TransactionManager2PL(Database db) {
super(db); super(db);
lobSession = database.sessionManager.getSysLobSession(); lobSession = database.sessionManager.getSysLobSession();
skipping to change at line 285 skipping to change at line 285
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; if (!session.isTransaction) {
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
// next lock release will do it // next lock release will do it
} else { } else {
setWaitingSessionTPL(session); setWaitingSessionTPL(session);
} }
} else { } else {
// this is redundant as it has been set when canProceed == false // this is redundant as it has been set when canProceed == false
session.abortTransaction = true; session.abortTransaction = true;
} }
} finally { } finally {
writeLock.unlock(); writeLock.unlock();
} }
} }
public void beginActionResume(Session session) { public void beginActionResume(Session session) {
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);
} }
} }
public void removeTransactionInfo(long id) {} public void removeTransactionInfo(long id) {}
 End of changes. 5 change blocks. 
9 lines changed or deleted 12 lines changed or added

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