I've been banging my head trying to figure out why my new code for
SEQUENCEs isn't passing the tests stored in the testing script. I
think it's because the tests are all based on an incorrect
implementation of SEQUENCE!

In the current version of the code, try the following:

CREATE SEQUENCE testSeq START WITH 5;
SELECT testSeq.currval;

Because this sequence is starting with 5 and we haven't modified it,
it stands to reason that currval would return 5, doesn't it? It
doesn't do that, though. Instead, it returns 4. Similarly, the
following SQL code...

CREATE SEQUENCE testSeq START WITH 10 INCREMENT BY 3;
SELECT testSeq.currval;

...will return 7. In Sequence.java, the value is stored correctly, but
the function "getCurrentValue()" returns the current value minus the
increment. However, all the script tests seem to think this is normal.
Am I missing something, or isn't this incorrect behavior?

-Evan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to