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
@@ -48,6 +48,9 @@ This results in two minor breaking changes:
48
48
+
49
49
** Reserved words are no longer considered simple identifiers by `enquoteIdentifier` and `isSimpleIdentifier` and will be quoted (or -- for dialect 1 -- result in a `SQLFeatureNotSupportedException`)
50
50
** 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/921[#921])
52
55
* Fixed: `IndexOutOfBoundsException` in `FBCachedBlob.getBytes(long, int)` for position or length beyond end of data (https://github.com/FirebirdSQL/jaybird/issues/923[#923])
53
56
* Fixed: Using native client, password is limited to 255 bytes (https://github.com/FirebirdSQL/jaybird/issues/925[#925])
@@ -230,6 +233,7 @@ See <<native-plugin>> for more information.
* ... and <<other-fixes-and-changes,other fixes and changes>>
234
238
235
239
Upgrading from Jaybird 5 should be straightforward, but please make sure to read <<compatibility-changes>> before using Jaybird 6.
@@ -1387,6 +1391,83 @@ The other properties -- here `user`, `password` and `socketFactory` -- are *not*
1387
1391
1388
1392
See also https://github.com/FirebirdSQL/jaybird/blob/master/devdoc/jdp/jdp-2024-09-custom-socket-factory-for-pure-java-connections.adoc[jdp-2024-09: Custom socket factory for pure Java connections]
1389
1393
1394
+
[#jdbc-escape-disable-proc]
1395
+
=== JDBC 4.5 support: JDBC escape to disable escape processing
1396
+
1397
+
JDBC 4.5 (Java 26) introduces a new JDBC escape to disable escape processing and parameter parsing within part of a statement text.
1398
+
This JDBC escape has been implemented in Jaybird 5.0.12 (backported from Jaybird 6.0.5).
1399
+
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()`.
1400
+
1401
+
The "`disable escape processing`" escape starts with `++{\++` and ends with `++\}++`.
1402
+
Within the escape, *all* occurrences of a backslash (`\`) *must* be escaped by doubling.
1403
+
Unescaped backslashes inside the escape will result in a `FBSQLParseException`.
1404
+
1405
+
.Some examples
1406
+
[listing]
1407
+
----
1408
+
-- Input:
1409
+
select {\"N\\A"\} from SOME_TABLE
1410
+
-- Sent to server:
1411
+
select "N\A" from SOME_TABLE
1412
+
1413
+
-- Input:
1414
+
select {\{fn EXP(2)}\} from SOME_TABLE
1415
+
-- Sent to server (results in a syntax error)
1416
+
select {fn EXP(2)} from SOME_TABLE
1417
+
----
1418
+
1419
+
.Same examples, but as Java string literals
1420
+
----
1421
+
-- Input:
1422
+
"select {\\\"N\\\\A\"\\} from SOME_TABLE"
1423
+
-- Sent to server:
1424
+
"select \"N\\A\" from SOME_TABLE"
1425
+
1426
+
-- Input:
1427
+
"select {\\{fn EXP(2)}\\} from SOME_TABLE"
1428
+
-- Sent to server (results in a syntax error)
1429
+
"select {fn EXP(2)} from SOME_TABLE"
1430
+
----
1431
+
1432
+
We think the use case for this escape is extremely limited, even non-existent, for Jaybird.
1433
+
Jaybird always offloads parameter parsing to Firebird, and Firebird currently has no syntax that could conflict with the definition of JDBC escapes.
1434
+
1435
+
.Possible ambiguity for comments, literals, and delimited identifiers
1436
+
[CAUTION]
1437
+
====
1438
+
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).
1439
+
Allowing this would conflict with the fact that other JDBC escapes are not parsed inside comments, literals, and delimited identifiers.
1440
+
Discussion with the JDBC spec lead and others did not resolve this ambiguity.
1441
+
1442
+
For Jaybird, we decide to reject attempts to end the escape in a comment, literal, or delimited identifier.
1443
+
Attempts to do so (e.g. `++{\ends/*in\}comment*/++`) will raise a `FBSQLParseException`.
1444
+
Valid alternatives would be:
1445
+
1446
+
* End it before the comment: +
1447
+
`++{\ends\}/*in\}comment*/++`
1448
+
* End it after the comment and escape the backslash in the comment: +
1449
+
`++{\ends/*in\\}comment*/\}++`
1450
+
* Or, don't use the escape: +
1451
+
`++ends/*in\}comment*/++`
1452
+
1453
+
If a consensus is reached in the JDBC Expert Group, or a community consensus arises, we may revisit this decision.
1454
+
1455
+
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]
1456
+
====
1457
+
1458
+
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.
1459
+
If it is used, we recommend only using it for the shortest substring needed.
1460
+
1461
+
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