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

count(*) from big table returns negative result [CORE2957] #3339

Closed
firebird-issue-importer opened this issue Apr 6, 2010 · 7 comments
Closed

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Apr 6, 2010

Submitted by: Vasily Vasilkov (chand0s)

1) Create the following table

CREATE TABLE BIG (
ID BIGINT NOT NULL
);
ALTER TABLE BIG ADD CONSTRAINT PK_BIG PRIMARY KEY (ID);
CREATE UNIQUE DESCENDING INDEX BIG_ID_DESC ON BIG (ID);

2) Insert 4000000000 (four billion) sequential values from 1 to 4000000000

3) Connect to this database from Linux (may be it is important, I don't know) via isql.
The Firebird version on Linux is LI-V2.1.3.18185 Firebird 2.1

4) Run the following query:

select min(id), max(id), count(*) from big;

5) Get the results
MIN MAX COUNT
===================== ===================== ============
1 4000000000 -294967296

Commits: 00c415e

====== Test Details ======

Added also check for results of aggregating (for smallint, int and bigint) and ranging analytical functions.

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Apr 6, 2010

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 2, 2011

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 2, 2011

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 3, 2011

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 3, 2011

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Feb 14, 2011

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 27, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

Test Details: Added also check for results of aggregating (for smallint, int and bigint) and ranging analytical functions.

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

2 participants