[#937] Fixed nested transactions that query database.

Nested transactions, Transaction#executeOther(Transaction), where the
inner transaction performed a query ran into NPE since the Database
used for the query had not been defined.
This commit is contained in:
Rsl1122 2019-02-28 19:18:17 +02:00
parent 5eef819308
commit 6806e6c98e

View File

@ -140,9 +140,11 @@ public abstract class Transaction {
} }
protected void executeOther(Transaction transaction) { protected void executeOther(Transaction transaction) {
transaction.db = db;
transaction.connection = this.connection; transaction.connection = this.connection;
transaction.performOperations(); transaction.performOperations();
transaction.connection = null; transaction.connection = null;
transaction.db = null;
} }
protected UUID getServerUUID() { protected UUID getServerUUID() {