According to discussion in comments in
MDEV-10139 "If there are multiple instances of <next value expression>s specifying the same sequence generator within a single SQL-statement, all those instances return the same value for a given row processed by that SQL-statement."
So SELECT below should show the same number twice, and it doesn't:
Oracle has a lot of limitations of how NEXTVAL() can be used:
In the case that Oracle doesn't support NEXTVAL(), we don't have return the lastvalue if it's too hard to achieve.
For example when doing an ORDER BY or GROUP BY with NEXTVAL(), it's not always possible to ensure that all NEXTVAL()
will return the same value for the same row combination. With current code we have:
Don't think we have to fix the above, but we have to at least document this.