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
select rdb$get_context('SYSTEM', 'ENGINE_VERSION')
from rdb$database;
Take this schema:
createtableb (x intprimary key);
createtablea (x intprimary key, y intreferences b);
insert into b values (1);
insert into b values (2);
insert into b values (3);
insert into b values (4);
insert into a values (1, 1);
insert into a values (2, 1);
insert into a values (3, 4);
insert into a values (4, 2);
Now, run this query:
selecta.x, b.xfrom a
left outer join b
on (
a.y=b.xanda.x=b.x
)
order bya.x
It produces:
|X |X |
|---|---|
|1 |1 |
|2 | |
|4 | |
|3 | |
Clearly, the ordering of the last two rows is wrong. It should be:
|X |X |
|---|---|
|1 |1 |
|2 | |
|3 | |
|4 | |
The text was updated successfully, but these errors were encountered:
@dyemanov Are you sure 5.0 was affected as well, because I could not reproduce it on 5.0.0.1073.
The code is the same, just slightly different index comparison logic is used (which index to use for ORDER BY). So this particular test works fine, but some different test may fail the same way.
I'm using Firebird 4.0.2 from here: https://hub.docker.com/r/jacobalberty/firebird, according to:
Take this schema:
Now, run this query:
It produces:
Clearly, the ordering of the last two rows is wrong. It should be:
The text was updated successfully, but these errors were encountered: