makssent opened a new pull request, #40174:
URL: https://github.com/apache/shardingsphere/pull/40174

   Changes proposed in this pull request:
     - `FirebirdDatabaseInfoReturnPacket` answers `isc_info_ods_version` and 
`isc_info_ods_minor_version` of `op_info_database` with 13 and 1, the on-disk 
structure (ODS) version of a database created by Firebird 5.0, instead of the 
server version 5 and 0.
     - The proxy presents itself as a Firebird 5.0 server: its server version 
and the answer to `isc_info_firebird_version` are built from constants. The ODS 
version is now a constant of the same server version; the proxy does not query 
the ODS of the backend databases, just as it does not query their server 
version.
     - Jaybird reads the ODS version right after the attachment and chooses 
metadata queries by it (`getTables` checks for ODS 11.2, `getIndexInfo` for ODS 
13.1); with ODS 5.0 from the proxy it used the variants for old databases.
   
   Verification:
   The same protocol packets were executed directly against a real database and 
through the proxy, and the results were compared.
   
   * Server: Firebird 5.0
   * Clients: Jaybird 5.0.13 and 6.0.6
   
     Jaybird sends `op_info_database` with `isc_info_ods_version` and 
`isc_info_ods_minor_version` right after the attachment; the result is read 
with `FirebirdDatabaseMetaData.getOdsMajorVersion()` and 
`getOdsMinorVersion()`. Jaybird 5 and 6 give the same results.
   
     Before the fix:
   
     | Packet | Proxy | Server | Match |
     |---|---|---|---|
     | `op_info_database`: `isc_info_ods_version`, `isc_info_ods_minor_version` 
(ODS of the database) | 5.0 | 13.1 | no |
   
     After the fix:
   
     | Packet | Proxy | Server | Match |
     |---|---|---|---|
     | `op_info_database`: `isc_info_ods_version`, `isc_info_ods_minor_version` 
(ODS of the database) | 13.1 | 13.1 | yes |
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following 
options:
   - [x] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the 
pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [x] I have added corresponding unit tests for my changes.
   - [ ] I have updated the Release Notes of the current development version. 
For more details, see [Update Release 
Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
   - [ ] I have specified the tool and the affected files or area for 
substantial AI assistance, as required by the [AI-assisted contribution policy].
   
   [AI-assisted contribution policy]: 
https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to