Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support longer update counts [CORE4230] #4554

Open
firebird-automations opened this issue Sep 20, 2013 · 0 comments
Open

Support longer update counts [CORE4230] #4554

firebird-automations opened this issue Sep 20, 2013 · 0 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

Firebird currently uses unsigned 32 bit integers for the update counts returned by the isc_info_req_update_count (and related info items). Can this be extends to unsiged 64 bit integers (which technically is already supported by the code in jrd/inf.cpp). The current code should be compatible with this change because it will return numbers that fit inside a signed 32 bit integer as a 4 byte vax integer, and if the receiving side does not support 8 byte vax integers the client code (also in for example 2.5) will return 0.

Looking at this I also notice a potential bug in the existing code: the update counts (defined as ULONG) don't correctly roundtrip for values larger than MAX_SLONG as those are sent as a vax int64, and a received update count is usually decoded with gds__vax_integer which will return 0 if the length of the vax integer is larger than 4 (see print_counts in qli\exe.cpp, process_record_count in isql\isql.epp)

Major reason (for me) is the introduction of retrieval of large update counts in the JDBC API with Java 8 / JDBC 4.2 (see http://download.java.net/jdk8/docs/api/java/sql/Statement.html#getLargeUpdateCount() ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant