Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
*/
public class AgroalSkipAutoCommitTest {
private static final PreparedStatementSpyConnectionProvider connectionProvider = new PreparedStatementSpyConnectionProvider();
private static final SettingProvider.Provider<PreparedStatementSpyConnectionProvider> connectionProviderProvider = () -> connectionProvider;

@Test
@ServiceRegistry(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,4 @@ public String[] getDropSchemaCommands(String schemaName) {
static String[] unsupportedCatalog(String name) {
throw new UnsupportedOperationException( "Catalog lifecycle is not supported" );
}

static String[] unsupportedSchema(String name) {
throw new UnsupportedOperationException( "Schema lifecycle is not supported" );
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,6 @@ public CurrentTemporalSupport getCurrentTemporalSupport() {

private static final int BIND_PARAMETERS_NUMBER_LIMIT = 32_767;

private static final String FOR_READ_ONLY_SQL = " for read only with rs";
private static final String FOR_SHARE_SQL = FOR_READ_ONLY_SQL + " use and keep share locks";
private static final String FOR_UPDATE_SQL = FOR_READ_ONLY_SQL + " use and keep update locks";
private static final String SKIP_LOCKED_SQL = " skip locked data";
private static final String FOR_SHARE_SKIP_LOCKED_SQL = FOR_SHARE_SQL + SKIP_LOCKED_SQL;
private static final String FOR_UPDATE_SKIP_LOCKED_SQL = FOR_UPDATE_SQL + SKIP_LOCKED_SQL;

private final LimitHandler limitHandler = getDB2Version().isBefore( 11, 1 )
? LegacyDB2LimitHandler.INSTANCE
: DB2LimitHandler.INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
import org.hibernate.service.ServiceRegistry;
import org.hibernate.sql.ast.spi.translation.SqlAstTranslator;
import org.hibernate.dialect.sql.ast.spi.SqlAstTranslatorFactory;
import org.hibernate.sql.spi.ParameterMarkerStrategy;
import org.hibernate.sql.spi.SqlAppender;
import org.hibernate.dialect.sql.ast.spi.StandardSqlAstTranslatorFactory;
import org.hibernate.sql.ast.spi.Statement;
Expand Down Expand Up @@ -1202,18 +1201,6 @@ private static MutationOperation withoutMerge(OptionalTableUpdateOperationReques
return new OptionalTableUpdateOperation( request.mutationTarget(), request.update() );
}

private static class NativeParameterMarkers implements ParameterMarkerStrategy {
/**
* Singleton access
*/
public static final NativeParameterMarkers INSTANCE = new NativeParameterMarkers();

@Override
public String createMarker(int position, JdbcType jdbcType) {
return "$" + position;
}
}

@Override
@SPI({ USE, IMPLEMENT, SUPPLY })
public DmlTargetColumnQualifierSupport getDmlTargetColumnQualifierSupport() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.hibernate.SPI;
import org.hibernate.dialect.sql.ast.spi.PaginationRenderingPlan;
import org.hibernate.dialect.sql.ast.spi.PaginationRenderingSupport;
import org.hibernate.dialect.sql.ast.spi.NullOrderingSupport;
import org.hibernate.dialect.sql.ast.spi.PrimaryTableReferenceContext;
import org.hibernate.dialect.sql.ast.spi.QueryMutationRenderingSupport;
import org.hibernate.dialect.sql.ast.spi.ReturningRenderingSupport;
Expand Down Expand Up @@ -249,12 +248,6 @@ public void visitLikePredicate(LikePredicate likePredicate) {
}
}

protected boolean allowsNullPrecedence() {
return getClauseStack().getCurrent() != Clause.WITHIN_GROUP
|| getDialect().getNullOrderingSupport()
.supports( NullOrderingSupport.Capability.NULLS_FIRST_LAST );
}

private boolean supportsOffsetFetchClause() {
return getDialect().getVersion().isSameOrAfter( 1, 4, 195 );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ public DatabaseVersion determineDatabaseVersion(DialectResolutionInfo info) {

private static final Boolean USE_LEGACY_BOOLEAN_TYPE_DEFAULT_VALUE = Boolean.FALSE;
private static final Boolean TREAT_DOUBLE_TYPED_FIELDS_AS_DECIMAL_DEFAULT_VALUE = Boolean.FALSE;
private static final String SQL_IGNORE_LOCKED = " ignore locked";

private final int maxLobPrefetchSize;

Expand Down Expand Up @@ -1662,14 +1661,6 @@ protected X doExtract(CallableStatement statement, String name, WrapperOptions o
}
};
}

public int getMaxLobPrefetchSize() {
return this.maxLobPrefetchSize;
}

public boolean isUseUnicodeStringTypes() {
return this.useUnicodeStringTypes;
}
}

private static class HANANClobJdbcType extends NClobJdbcType {
Expand Down Expand Up @@ -1765,10 +1756,6 @@ protected X doExtract(CallableStatement statement, String name, WrapperOptions o
}
};
}

public int getMaxLobPrefetchSize() {
return maxLobPrefetchSize;
}
}

public static class HANABlobType implements JdbcType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,18 +344,6 @@ public SequenceInformationExtractor getSequenceInformationExtractor() {
: super.getSequenceInformationExtractor();
}

@Override
boolean supportsForShare() {
//only supported on MySQL
return false;
}

@Override
boolean supportsAliasLocks() {
//only supported on MySQL
return false;
}

@Override
@SPI({ IMPLEMENT, SUPPLY })
public FunctionalDependencyAnalysisSupport getFunctionalDependencyAnalysisSupport() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1400,14 +1400,6 @@ protected void contributeKeywords(KeywordRegistration registration) {
registration.registerKeyword( "key" );
}

boolean supportsForShare() {
return getMySQLVersion().isSameOrAfter( 8 );
}

boolean supportsAliasLocks() {
return getMySQLVersion().isSameOrAfter( 8 );
}

@Override
@SPI({ IMPLEMENT, SUPPLY })
public FunctionalDependencyAnalysisSupport getFunctionalDependencyAnalysisSupport() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,6 @@ protected <S extends Statement, T extends JdbcOperation> SqlAstTranslator<T> cre
private static final int SQLITE_BUSY = 5;
private static final int SQLITE_LOCKED = 6;
private static final int SQLITE_IOERR = 10;
private static final int SQLITE_CORRUPT = 11;
private static final int SQLITE_NOTFOUND = 12;
private static final int SQLITE_FULL = 13;
private static final int SQLITE_CANTOPEN = 14;
private static final int SQLITE_PROTOCOL = 15;
private static final int SQLITE_TOOBIG = 18;
private static final int SQLITE_CONSTRAINT = 19;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ public CurrentTemporalSupport getCurrentTemporalSupport() {
@Override public TypeSizingProfile getTypeSizingProfile() { return typeSizingProfile; }

private static final int PARAM_LIST_SIZE_LIMIT = 1_048_576;
private static final String[] NO_COMMANDS = new String[0];
private static final EmptyExporter NOOP_EXPORTER = new EmptyExporter();
private static final UniqueDelegate NOOP_UNIQUE_DELEGATE = UniqueDelegates.none();
private static final DatabaseVersion MINIMUM_VERSION = DatabaseVersion.make( 8, 0 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
public class InterSystemsIRISLimitHandler extends AbstractLimitHandler {
public static final InterSystemsIRISLimitHandler INSTANCE = new InterSystemsIRISLimitHandler(true);

private final boolean variableLimit;

public InterSystemsIRISLimitHandler(boolean variableLimit) {
this.variableLimit = variableLimit;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@ public final boolean isLifecyclePrepared() {
return lifecyclePrepared;
}

/// The queue-neutral interpretation frozen before this action was lowered.
///
/// @since 8.0
@Nullable
public final CollectionMutationInterpretation getCollectionMutationInterpretation() {
return interpretation;
}

/// Return the interpretation after verifying that the collection still has
/// the structural state from which it was produced.
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,6 @@ public final class CollectionRecreateAction extends CollectionAction {

@Nullable
private final Object affectedOwner;
@Nullable
private final Object affectedOwnerId;

/**
* Constructs a CollectionRecreateAction
* @param collection The collection being recreated
* @param persister The collection persister
* @param id The collection key
* @param session The session
*/
public CollectionRecreateAction(
final @Nonnull PersistentCollection<?> collection,
final @Nonnull CollectionPersister persister,
final @Nullable Object id,
final @Nonnull EventSource session) {
super( persister, collection, id, session );
assert collection != null;
// Capture the owner at action creation time so it's available when the post-event
// fires (which may be after the collection owner reference has been cleared)
affectedOwner = collection.getOwner();
// Also capture the owner ID from the entity entry at action creation time
final var ownerEntry = session.getPersistenceContextInternal().getEntry( affectedOwner );
affectedOwnerId = ownerEntry != null ? ownerEntry.getId() : null;
}

/// Creates the legacy lowering of an already-prepared semantic mutation.
///
Expand All @@ -57,7 +33,6 @@ public CollectionRecreateAction(
final CollectionMutationInterpretation interpretation) {
super( persister, collection, id, session, true, interpretation );
this.affectedOwner = affectedOwner;
this.affectedOwnerId = affectedOwnerId;
}

@Override
Expand Down Expand Up @@ -141,9 +116,4 @@ private PostCollectionRecreateEvent newPostCollectionRecreateEvent() {
public Object getAffectedOwner() {
return affectedOwner;
}

@Nullable
public Object getAffectedOwnerId() {
return affectedOwnerId;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.hibernate.AssertionFailure;
import org.hibernate.collection.spi.PersistentCollection;
import org.hibernate.collection.spi.CollectionMutationInterpretation;
import org.hibernate.engine.internal.FlushProcessingContext;
Expand All @@ -20,40 +19,8 @@ public final class CollectionRemoveAction extends CollectionAction {

@Nullable
private final Object affectedOwner;
@Nullable
private final Object affectedOwnerId;
private final boolean emptySnapshot;

/**
* Removes a persistent collection from its loaded owner.
* <p>
* Use this constructor when the collection is non-null.
*
* @param collection The collection to remove; must be non-null
* @param persister The collection's persister
* @param id The collection key
* @param emptySnapshot Indicates if the snapshot is empty
* @param session The session
*
* @throws AssertionFailure if collection is null.
*/
public CollectionRemoveAction(
final @Nonnull PersistentCollection<?> collection,
final @Nonnull CollectionPersister persister,
final @Nullable Object id, // only null in certain deserialization tests
final boolean emptySnapshot,
final @Nonnull EventSource session) {
super( persister, collection, id, session );
assert collection != null;
this.emptySnapshot = emptySnapshot;
// the loaded owner will be set to null after the collection is removed,
// so capture its value as the affected owner so it is accessible to
// both pre- and post- events
final var persistenceContext = session.getPersistenceContextInternal();
affectedOwner = persistenceContext.getLoadedCollectionOwnerOrNull( collection );
affectedOwnerId = persistenceContext.getLoadedCollectionOwnerIdOrNull( collection );
}

/// Creates the legacy lowering of an already-prepared semantic mutation.
///
/// @since 8.0
Expand All @@ -69,60 +36,6 @@ public CollectionRemoveAction(
super( persister, collection, id, session, true, interpretation );
this.emptySnapshot = emptySnapshot;
this.affectedOwner = affectedOwner;
this.affectedOwnerId = affectedOwnerId;
}

/**
* Removes a persistent collection from a specified owner.
* <p>
* Use this constructor when the collection to be removed has not been loaded.
*
* @param affectedOwner The collection's owner; must be non-null
* @param persister The collection's persister
* @param id The collection key
* @param emptySnapshot Indicates if the snapshot is empty
* @param session The session
*
* @throws AssertionFailure if affectedOwner is null.
*/
public CollectionRemoveAction(
final @Nonnull Object affectedOwner,
final @Nonnull CollectionPersister persister,
final @Nonnull Object id,
final boolean emptySnapshot,
final @Nonnull EventSource session) {
super( persister, null, id, session );
assert affectedOwner != null;
assert id != null;
this.emptySnapshot = emptySnapshot;
this.affectedOwner = affectedOwner;
// Get the owner ID from the entity entry at action creation time
final var ownerEntry = session.getPersistenceContextInternal().getEntry( affectedOwner );
affectedOwnerId = ownerEntry != null ? ownerEntry.getId() : null;
}

/**
* Removes a persistent collection for an unloaded proxy.
* <p>
* Use this constructor when the owning entity is has not been loaded.
*
* @param persister The collection's persister
* @param id The collection key
* @param session The session
*/
public CollectionRemoveAction(
final @Nonnull CollectionPersister persister,
final @Nonnull Object id,
final @Nonnull EventSource session) {
super( persister, null, id, session );
assert id != null;
emptySnapshot = false;
affectedOwner = null;
affectedOwnerId = null;
}

public boolean isEmptySnapshot() {
return emptySnapshot;
}

@Override
Expand Down Expand Up @@ -206,9 +119,4 @@ private PostCollectionRemoveEvent newPostCollectionRemoveEvent() {
public Object getAffectedOwner() {
return affectedOwner;
}

@Nullable
public Object getAffectedOwnerId() {
return affectedOwnerId;
}
}
Loading
Loading