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

BIN_SHL and BIN_SHR does not work in Dialect 1 [CORE4569] #4886

Closed
firebird-automations opened this issue Oct 2, 2014 · 9 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Oleg Matveyev (o_matveev)

DIALECT 1

SELECT BIN_SHL(1, 1) FROM RDB$DATABASE was return

An error was found in the application program input parameters for the SQL statement.
Dynamic SQL Error.
SQL error code = -804.
Data type unknown.
Client SQL dialect 1 does not support reference to BIGINT datatype.

@firebird-automations
Copy link
Collaborator Author

Commented by: Ann Harrison (awharrison)

Dialect one doesn't support 64bit integers. The dialect has been deprecated for over 15 years. Should the developers spend time enhansing it after all that time?

@firebird-automations
Copy link
Collaborator Author

Commented by: Oleg Matveyev (o_matveev)

Show me please, where 64int in this query.
INTEGER officially 32int

This query does not work too:
SELECT BIN_SHL(CAST(1 AS INTEGER), CAST(1 AS INTEGER)) FROM RDB$DATABASE

Dialect 3 is not a enhancing for the legacy systems.
Internal implementing BIN_SHL through int64 for dialect 1 is a bug.
BIN_AND working wonderful in the Dialect 1, for example.

@firebird-automations
Copy link
Collaborator Author

Modified by: Oleg Matveyev (o_matveev)

environment: 64bit version for Windows

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Firebird 3 accepts BIGINT type in dialect 1.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 1 [ 10332 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Oleg, BIN_AND/OR do not expand the result, but BIN_SHL does (higher bit moves), so the result becomes 64-bit. I'm not sure whether it's correct for BIN_SHR though.

@firebird-automations
Copy link
Collaborator Author

Commented by: Oleg Matveyev (o_matveev)

Dmitry, BIN_SHR has a bug too: ... Client SQL dialect 1 does not support reference to BIGINT datatype.

Why shift in the RIGHT expand the result? It is illogical.
I think shift fuctions implemented
__int64 BIN_SHR(__int64,__int64), but it is incorrect for Dialect 1

May be this bug reproduced only in the 64bit version?

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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