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

Difficulty returning the product version with the legacy connection #7819

Closed
MarceloZaniboni opened this issue Oct 31, 2023 · 17 comments
Closed

Comments

@MarceloZaniboni
Copy link

I am having difficulties with the Firebird 5.0 Release Candidate 1 version. The same did not happen in the Firebird 5.0 Beta 1 version, regarding version changes in legacy applications developed in Delphi Tokyo using the DBExpress (TSQLConnection) component.
Test with the latest snapshot version available, the problem still persists.
Next, send a test application for analysis if possible.
And two images, one with the problem in the latest version of Release Candidate 1 available and another with the result of beta version 1.
Thank you very much in advance.
Thanks,
Marcelo Zaniboni

FB5 0 0 1258-0-RC1

FB5 0 0 973-BETA1

TestLegancyCnxFB50.zip

@hvlad
Copy link
Member

hvlad commented Oct 31, 2023

The DBX driver call isc_database_info() and asks for isc_info_isc_version info item.
It provides output buffer of 40 bytes length.
The info requested is 49 bytes length and can't fit the buffer passed by client.
Thus Firebird answers with isc_info_truncated.
Then app throws AV.

The Firebird answer is WI-5.0.0.1227 Firebird 5.0 Release Candidate 1
Before RC1 it was WI-5.0.0.973 Firebird 5.0 Beta 1 and fits into 40-byte buffer.
After release it will be shorter again.

The guess is that driver can't correctly handle isc_info_truncated or crashes when tries to extract some version number from this info-string and can't find some known pattern in it.

We can make version string shorter or truncate it according to the client buffer size but I not sure we should do it.

@dyemanov
Copy link
Member

We never did that in prior versions and nobody complained so far, while we supposedly have some DBX users. Weird ;-)

@hvlad
Copy link
Member

hvlad commented Oct 31, 2023

I guess DBX have not much users and not all of them tested our RC versions ;)
Just confirmed same behavior with FB 4.0.0.2353-0-RC1

@hvlad
Copy link
Member

hvlad commented Oct 31, 2023

From another POV - DBX users are unable to test RC, which also not good.

@AlexPeshkoff
Copy link
Member

The simplest is change 'Release Candidate' => 'RC' .

@AlexPeshkoff
Copy link
Member

In RC2

@aafemt
Copy link
Contributor

aafemt commented Oct 31, 2023

From another POV - DBX users are unable to test RC, which also not good.

They are able to test DBX and found an obvious bug in it. Now the ball is on Embarcadero side (or whoever is the author of the driver).

@MarceloZaniboni
Copy link
Author

From another POV - DBX users are unable to test RC, which also not good.

They are able to test DBX and found an obvious bug in it. Now the ball is on Embarcadero side (or whoever is the author of the driver).

The problem is that DBXExpress is a discontinued drive. That's why I said it's a legacy application.

@aafemt
Copy link
Contributor

aafemt commented Nov 1, 2023

It means that you must fix the application, that's all. Not a Firebird issue.

@MarceloZaniboni
Copy link
Author

MarceloZaniboni commented Nov 1, 2023

It means that you must fix the application, that's all. Not a Firebird issue.

As it is a legacy application, it is not possible to change everything at once, this is already being modified gradually by the team. But as there is a legacy configuration in Firebird, I understand that it could work, as it worked in the beta version. But that's just my point of view.

@AlexPeshkoff
Copy link
Member

Marcelo, your application is unable to handle version information string that is a bit longer than one in beta version - yep, strlen("release candidate") > strlen("beta"). :-) Pay attention that length of version string in LEGACY API is limited somewhere around 255 bytes (a bit smaller - but one returned to your app is definitely MUCH shorter). I.e. your application violates legacy rules. That's why it does not work.

@hvlad
Copy link
Member

hvlad commented Nov 1, 2023

@AlexPeshkoff, it is not an applicaiton bug, it is DBX driver problem.
AFAIU, DBX is closed source and can't be fixed easily.

The first question is should we change something on our side or recommend @MarceloZaniboni to wait for final release of Firebird 5 ?

@AlexPeshkoff
Copy link
Member

AlexPeshkoff commented Nov 1, 2023 via email

@aafemt
Copy link
Contributor

aafemt commented Nov 1, 2023

it is DBX driver problem. AFAIU, DBX is closed source and can't be fixed easily.

Perhaps, they should try DBX driver by Devart: https://www.devart.com/dbx/interbase/

@hvlad
Copy link
Member

hvlad commented Nov 1, 2023

As I've already replied - the simplest solution is to call 'release candidate 2' RC2

Ok, if there will be no objections, I'll commit it tomorrow.

hvlad added a commit that referenced this issue Nov 2, 2023
It also fixed #7819 : Difficulty returning the product version with the legacy connection
@hvlad hvlad self-assigned this Nov 2, 2023
@hvlad
Copy link
Member

hvlad commented Nov 2, 2023

Check next snapshot build, please

@hvlad hvlad closed this as completed Nov 6, 2023
@MarceloZaniboni
Copy link
Author

Check next snapshot build, please

Thank you very much, resolved!

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

5 participants