HHH-7816 - DDL opertations will incorrectly commit current transaction on Oracle XA
(cherry picked from commit 5d2f21a01e
)
This commit is contained in:
parent
e9405fe031
commit
94385b8656
|
@ -105,7 +105,7 @@ public class TemporaryTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
|||
session.getTransactionCoordinator()
|
||||
.getTransaction()
|
||||
.createIsolationDelegate()
|
||||
.delegateWork( work, session.getFactory().getSettings().isDataDefinitionInTransactionSupported() );
|
||||
.delegateWork( work, shouldTransactIsolatedTemporaryTableDDL( session ) );
|
||||
}
|
||||
else {
|
||||
final Connection connection = session.getTransactionCoordinator()
|
||||
|
@ -127,7 +127,7 @@ public class TemporaryTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
|||
session.getTransactionCoordinator()
|
||||
.getTransaction()
|
||||
.createIsolationDelegate()
|
||||
.delegateWork( work, session.getFactory().getSettings().isDataDefinitionInTransactionSupported() );
|
||||
.delegateWork( work, shouldTransactIsolatedTemporaryTableDDL( session ) );
|
||||
}
|
||||
else {
|
||||
final Connection connection = session.getTransactionCoordinator()
|
||||
|
@ -174,6 +174,13 @@ public class TemporaryTableBulkIdStrategy implements MultiTableBulkIdStrategy {
|
|||
return session.getFactory().getSettings().isDataDefinitionImplicitCommit();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "UnnecessaryUnboxing" })
|
||||
protected boolean shouldTransactIsolatedTemporaryTableDDL(SessionImplementor session) {
|
||||
// is there ever a time when it makes sense to do this?
|
||||
// return session.getFactory().getSettings().isDataDefinitionInTransactionSupported();
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class TemporaryTableCreationWork extends AbstractWork {
|
||||
private final Queryable persister;
|
||||
|
||||
|
|
Loading…
Reference in New Issue