diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-09-03 03:13:59 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-09-03 03:13:59 +0000 |
commit | 077804624eb7dc69899d1c7f045931f794501925 (patch) | |
tree | b0201f65c47beb159283a745005d6dc622ea4e61 | |
parent | 3385da4f6c830f1a7aa3ebe7c15af19ff65c0dda (diff) |
Fixed transaction leak caused when calling update, if an update trigger exists, and no properties were dirty.
-rw-r--r-- | RELEASE-NOTES.txt | 2 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index e50fd25..d8c31bb 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -40,6 +40,8 @@ Carbonado change history repair if only alternate keys were specified.
- Fixed query descending sort order bug which produced ascending results.
- Fixed bug in GroupedCursor which discarded last group if it had one element.
+- Fixed transaction leak caused when calling update, if an update trigger
+ exists, and no properties were dirty.
1.1 to 1.1.1
-------------------------------
diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java index 4bc5010..ea61306 100644 --- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java @@ -1320,6 +1320,16 @@ public final class StorableGenerator<S extends Storable> { // Even though there was no update, still need tryLoad side-effect.
{
+ // if (txn != null) {
+ // txn.exit();
+ // }
+ b.loadLocal(txnVar);
+ Label noTxn = b.createLabel();
+ b.ifNullBranch(noTxn, true);
+ b.loadLocal(txnVar);
+ b.invokeInterface(transactionType, EXIT_METHOD_NAME, null, null);
+ noTxn.setLocation();
+
Label tryStart2 = b.createLabel().setLocation();
b.loadThis();
b.invokeVirtual(DO_TRY_LOAD_METHOD_NAME, TypeDesc.BOOLEAN, null);
|