summaryrefslogtreecommitdiff
path: root/test/regress/1998.test
Commit message (Collapse)AuthorAgeFilesLines
* compare_by_commodity: Always return the result of the recursive callChristoph Dittmann2021-01-301-0/+14
Commit 501fbc08ae5493db77bb34f4c4fbe1f3a3bc14e3 changed the behavior of this function to not return the "equal" result (==0) from the recursive call. Previously, the function returned the result of the recursive call unconditionally. The current behavior causes an assertion error for certain postings. The regression test added in this commit shows such a posting. I found through Travis CI that the old behavior was incomplete and caused unstable orderings, so reverting to the old behavior doesn't work. Instead, this change adds a fallback: If the recursive call that compares the prices numerically returns "equal", then compare the prices with their original commodity as a tie breaker. This commit does not change any existing ordering, it only adds deterministic ordering in a case that currently triggers an assertion error. This fixes issue #1998.