You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/HANALegacyServerConfiguration.java
"SELECT TOP 1 VALUE,MAP(LAYER_NAME,'DEFAULT',1,'SYSTEM',2,'DATABASE',3,4) AS LAYER FROM SYS.M_INIFILE_CONTENTS WHERE FILE_NAME='indexserver.ini' AND SECTION='session' AND KEY='max_lob_prefetch_size' ORDER BY LAYER DESC" ) ) {
56
-
// This only works if the current user has the privilege INIFILE ADMIN
"SELECT TOP 1 VALUE,MAP(LAYER_NAME,'DEFAULT',1,'SYSTEM',2,'DATABASE',3,4) AS LAYER FROM SYS.M_CONFIGURATION_PARAMETER_VALUES WHERE FILE_NAME='indexserver.ini' AND SECTION='session' AND KEY='max_lob_prefetch_size' ORDER BY LAYER DESC" ) ) {
74
+
// This only works if the current user has the privilege INIFILE ADMIN
75
+
if ( rs.next() ) {
76
+
maxLobPrefetchSize = rs.getInt( 1 );
77
+
}
78
+
}
79
+
}
80
+
catch (SQLExceptione) {
81
+
// Ignore
82
+
LOG.debug(
83
+
"An error occurred while trying to determine the value of the HANA parameter indexserver.ini / session / max_lob_prefetch_size.",
84
+
e );
85
+
}
86
+
}
87
+
else {
88
+
databaseVersion = determineDatabaseVersion( info );
89
+
}
68
90
}
69
91
// default to the dialect-specific configuration settings
70
92
if ( maxLobPrefetchSize == null ) {
@@ -74,12 +96,78 @@ public static HANALegacyServerConfiguration fromDialectResolutionInfo(DialectRes
74
96
MAX_LOB_PREFETCH_SIZE_DEFAULT_VALUE
75
97
);
76
98
}
77
-
returnnewHANALegacyServerConfiguration( staticDetermineDatabaseVersion( info ), maxLobPrefetchSize );
99
+
if ( databaseVersion == null ) {
100
+
databaseVersion = staticDetermineDatabaseVersion( info );
0 commit comments