Skip to content

Conversation

@andreitokar
Copy link
Contributor

fixes #4079

@katzyn
Copy link
Contributor

katzyn commented Jul 17, 2024

Looks good, but I think we need a test case to prevent regressions is the future, something like

CREATE TABLE TEST(A INT);
> ok

CREATE INDEX TEST_A_IDX ON TEST(A);
> ok

INSERT INTO TEST VALUES 1, 2, 1, 2, 5;
> update count: 5

SELECT * FROM TEST WHERE A <= 2 ORDER BY A;
> A
> -
> 1
> 1
> 2
> 2
> rows (ordered): 4

SELECT * FROM TEST WHERE A >= 2 ORDER BY A DESC;
> A
> -
> 5
> 2
> 2
> rows (ordered): 3

DROP TABLE TEST;
> ok

Primary and delegate indexes aren't affected, because their keys and values are equal to each other.

@andreitokar
Copy link
Contributor Author

Sure, row.sql ?

@katzyn
Copy link
Contributor

katzyn commented Jul 17, 2024

Similar tests are in queries/select.sql.

row.sql isn't related.

@andreitokar andreitokar merged commit a04a36e into h2database:master Jul 17, 2024
@andreitokar andreitokar deleted the issue_4079 branch July 31, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.3.230] Regression in ORDER BY ... DESC on dates

2 participants