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

Create a legacy configuration property to map COUNT as INTEGER instead of BIGINT [CORE5514] #5783

Open
firebird-automations opened this issue Mar 31, 2017 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Beto Neto (betoneto.tbo)

Votes: 1

Create a legacy configuration property to map COUNT as INTEGER instead of BIGINT in firebird.conf.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Why?

@firebird-automations
Copy link
Collaborator Author

Commented by: Beto Neto (betoneto.tbo)

My ERP application has a lot of queries hardcoded in different artifacts (pas, dfm, etc).

There is also customized SQLs persisted inside client's database (reports, charts, etc).

For us is very heavy to create a migration routine to change this artifacts to force an "cast as integer" or fix to use the correct data type mapper.

If there was a legacy configuration property to do this (like "AuthClient = Legacy_Auth") will be awesome.

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

I can confirm this problem e.g. in Delphi.
I post about this on the mailing group but no action was taken only hint in documentation.
If you store fields definition in dfm Delphi create exact Field class type with buffer for 4 bytes (Integer) and can not store more

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

The component can declare for the Firebord API what field type it expects. If it doesn't do it, the bug is in it.

@firebird-automations
Copy link
Collaborator Author

Commented by: Beto Neto (betoneto.tbo)

Yes, and it declares! But this is the problem!

All declarations are in TIntegerField (32 bits) and now the query returns a Bigint (64bits).

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

So what? Result will be silently casted to Integer. Of course, it may not fit, but do you really expect more than 4G records in tables? Anyway, getting a runtime overflow error may still be better than getting e.g. negative result due to wrapping.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Beto, even files already compiled by the ancient tool GPRE works after the change in COUNT.

@firebird-automations
Copy link
Collaborator Author

Commented by: Beto Neto (betoneto.tbo)

The problem is that my dbexpress driver is mapping the new count as a FMTBcd, and this is resulting an exception "TIntegerField is not compatible with FMTBcdField".

I'm using Delphi 7 with an dbexpress driver owned from upscene.

I known that is an deprecated IDE, but that is what my company has.

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

Isn't this ticket covered by SET BIND command?

@firebird-automations
Copy link
Collaborator Author

Commented by: Beto Neto (betoneto.tbo)

Dimitry, can you provide more details or samples of SET BIND?

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