You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tom Krej asked in firebird-support 5 February a question regarding ordering when selecting from a view. I cannot see any description of what he found here, so I'm reporting what appears to be a bug. He found the bug in Firebird 2.1, but reported that it also existed in Firebird 2.0. Trying it on 2.5 RC2, I find that it is still there. Here's the simplest way to reproduce the bug:
CREATE TABLE TEST_TABLE(MYFIELD INTEGER);
CREATE VIEW TEST_VIEW(MYFIELD1, MYFIELD2) AS
SELECT DISTINCT M.MYFIELD, S.MYFIELD
FROM TEST_TABLE M
LEFT JOIN TEST_TABLE S ON M.MYFIELD = S.MYFIELD;
COMMIT;
INSERT INTO TEST_TABLE VALUES (1);
INSERT INTO TEST_TABLE VALUES (2);
COMMIT;
SELECT * FROM TEST_VIEW
ORDER BY MYFIELD1 DESC
The ordering is the same regardless of whether ASC or DESC ordering is specified.
====== Test Details ======
Test was included into core-1089.fbt as separate sample, with referece to this ticket.
The text was updated successfully, but these errors were encountered:
Submitted by: Svein Erling Tysvær (set)
Duplicates CORE1089
Is duplicated by CORE2870
Tom Krej asked in firebird-support 5 February a question regarding ordering when selecting from a view. I cannot see any description of what he found here, so I'm reporting what appears to be a bug. He found the bug in Firebird 2.1, but reported that it also existed in Firebird 2.0. Trying it on 2.5 RC2, I find that it is still there. Here's the simplest way to reproduce the bug:
CREATE TABLE TEST_TABLE(MYFIELD INTEGER);
CREATE VIEW TEST_VIEW(MYFIELD1, MYFIELD2) AS
SELECT DISTINCT M.MYFIELD, S.MYFIELD
FROM TEST_TABLE M
LEFT JOIN TEST_TABLE S ON M.MYFIELD = S.MYFIELD;
COMMIT;
INSERT INTO TEST_TABLE VALUES (1);
INSERT INTO TEST_TABLE VALUES (2);
COMMIT;
SELECT * FROM TEST_VIEW
ORDER BY MYFIELD1 DESC
The ordering is the same regardless of whether ASC or DESC ordering is specified.
====== Test Details ======
Test was included into core-1089.fbt as separate sample, with referece to this ticket.
The text was updated successfully, but these errors were encountered: