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: src/docs/asciidoc/release_notes.adoc
+81Lines changed: 81 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,9 @@ This results in two minor breaking changes:
51
51
+
52
52
** Reserved words are no longer considered simple identifiers by `enquoteIdentifier` and `isSimpleIdentifier` and will be quoted (or -- for dialect 1 -- result in a `SQLFeatureNotSupportedException`)
53
53
** Presence of the NUL character (U+0000) in an identifier passed to `enquoteIdentifier` will result in a `SQLSyntaxErrorException`
* Fixed: JDBC escapes should not be parsed inside dialect 3 delimited identifiers or dialect 1 string literals (https://github.com/FirebirdSQL/jaybird/issues/922[#922])
55
58
* Fixed: `IndexOutOfBoundsException` in `FBCachedBlob.getBytes(long, int)` for position or length beyond end of data (https://github.com/FirebirdSQL/jaybird/issues/924[#924])
56
59
* Fixed: Using native client, password is limited to 255 bytes (https://github.com/FirebirdSQL/jaybird/issues/926[#926])
@@ -362,6 +365,7 @@ The major changes and new features in Jaybird 5 are:
Upgrading from Jaybird 4 to 5 should be simple, but please make sure to read <<compatibility-changes>> before using Jaybird 5.
367
371
See also <<upgrading-from-jaybird-4-to-jaybird-5>>.
@@ -1161,6 +1165,83 @@ sends data from array `b` to the blob, starting at `off`, for the requested `len
1161
1165
The documentation of method `FbBlob.putSegment(byte[])` contradicted itself, by requiring implementations to batch larger arrays, but also requiring them to throw an exception for larger arrays, and the actual implementations provided by Jaybird threw an exception.
1162
1166
This contradiction has been removed, and the implementations will now send arrays longer than the maximum segment size to the server in multiple _put_ requests.
1163
1167
1168
+
[#jdbc-escape-disable-proc]
1169
+
=== JDBC 4.5 support: JDBC escape to disable escape processing
1170
+
1171
+
JDBC 4.5 (Java 26) introduces a new JDBC escape to disable escape processing and parameter parsing within part of a statement text.
1172
+
This JDBC escape has been implemented in Jaybird 5.0.12 (backported from Jaybird 6.0.5).
1173
+
The escape is always parsed if escape processing is enabled (the default), no matter the Java version and the JDBC minor version reported by `DatabaseMetaData#getJDBCMinorVersion()`.
1174
+
1175
+
The "`disable escape processing`" escape starts with `++{\++` and ends with `++\}++`.
1176
+
Within the escape, *all* occurrences of a backslash (`\`) *must* be escaped by doubling.
1177
+
Unescaped backslashes inside the escape will result in a `FBSQLParseException`.
1178
+
1179
+
.Some examples
1180
+
[listing]
1181
+
----
1182
+
-- Input:
1183
+
select {\"N\\A"\} from SOME_TABLE
1184
+
-- Sent to server:
1185
+
select "N\A" from SOME_TABLE
1186
+
1187
+
-- Input:
1188
+
select {\{fn EXP(2)}\} from SOME_TABLE
1189
+
-- Sent to server (results in a syntax error)
1190
+
select {fn EXP(2)} from SOME_TABLE
1191
+
----
1192
+
1193
+
.Same examples, but as Java string literals
1194
+
----
1195
+
-- Input:
1196
+
"select {\\\"N\\\\A\"\\} from SOME_TABLE"
1197
+
-- Sent to server:
1198
+
"select \"N\\A\" from SOME_TABLE"
1199
+
1200
+
-- Input:
1201
+
"select {\\{fn EXP(2)}\\} from SOME_TABLE"
1202
+
-- Sent to server (results in a syntax error)
1203
+
"select {fn EXP(2)} from SOME_TABLE"
1204
+
----
1205
+
1206
+
We think the use case for this escape is extremely limited, even non-existent, for Jaybird.
1207
+
Jaybird always offloads parameter parsing to Firebird, and Firebird currently has no syntax that could conflict with the definition of JDBC escapes.
1208
+
1209
+
.Possible ambiguity for comments, literals, and delimited identifiers
1210
+
[CAUTION]
1211
+
====
1212
+
Given the backslash must be escaped everywhere inside the escape, the definition in the JDBC 4.5 specification can be interpreted to mean that the escape can end inside a comment, literal, or delimited identifier (quoted identifier).
1213
+
Allowing this would conflict with the fact that other JDBC escapes are not parsed inside comments, literals, and delimited identifiers.
1214
+
Discussion with the JDBC spec lead and others did not resolve this ambiguity.
1215
+
1216
+
For Jaybird, we decide to reject attempts to end the escape in a comment, literal, or delimited identifier.
1217
+
Attempts to do so (e.g. `++{\ends/*in\}comment*/++`) will raise a `FBSQLParseException`.
1218
+
Valid alternatives would be:
1219
+
1220
+
* End it before the comment: +
1221
+
`++{\ends\}/*in\}comment*/++`
1222
+
* End it after the comment and escape the backslash in the comment: +
1223
+
`++{\ends/*in\\}comment*/\}++`
1224
+
* Or, don't use the escape: +
1225
+
`++ends/*in\}comment*/++`
1226
+
1227
+
If a consensus is reached in the JDBC Expert Group, or a community consensus arises, we may revisit this decision.
1228
+
1229
+
Further details can be found in https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2026-03-jdbc-escape-to-disable-escape-processing.adoc[jdp-2026-03: JDBC escape to disable escape processing]
1230
+
====
1231
+
1232
+
Given above ambiguity, and the lack of a real need to use it for Jaybird/Firebird, we recommend avoiding use of this escape unless absolutely necessary.
1233
+
If it is used, we recommend only using it for the shortest substring needed.
1234
+
1235
+
For example, the last example (passing the `++{fn EXP(2)}++` to the server) could also be achieved by only disabling escape processing for the braces:
0 commit comments