-
Notifications
You must be signed in to change notification settings - Fork 38.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SybaseMaxValueIncrementer doesn't work with non-enterprise Sybase db [SPR-7623] #12279
Comments
Juergen Hoeller commented Thomas, does this change look ok to you? Any backwards compatility issues here? Juergen |
Thomas Risberg commented I don't see a patch attached. Using the currently recommended table definition I tried executing: insert into tab_sequence values(DEFAULT) This throws an exception with Adaptive Server Enterprise/15.0.2. [Error Code: 7743, SQL State: ZZZZZ] An explicit value for the identity field in table 'tab_sequence' can only be specified in an insert statement when a field list is used. So we would need a bit more background for when the current implementation fails (what database and version) so we can find an appropriate solution. Thomas |
Tarald Saxi Stormark commented I'll talk to our DB guy at work on monday and get all the details. What I know is that we are not using the Adaptive Server Enterprise, we are using the cheaper version for small and medium size businesses and it's using SQL Anywhere. It does not accept inserts without arguments, so I had to copy the class and insert the keyword 'DEFAULT' as described and it worked. But now it seems Adaptive Server Enterprise doesn't accept the keyword 'DEFAULT' so this will probably not be the solution. |
Tarald Saxi Stormark commented This is our DB: |
Thomas Risberg commented Thanks for the feedback, I've downloaded Sybase Anywhere 11.0.1 so I can do some testing. I'm planning on adding a new SybaseAnywhereMaxValueIncrementer that uses the syntax that works for SQL Anywhere - should be able to do that for 3.0.5. -Thomas |
Tarald Saxi Stormark commented Thanks for fixing it so soon :-) |
Tarald Saxi Stormark opened SPR-7623 and commented
In SybaseMaxValueIncrementer the code line: stmt.executeUpdate("insert into " + getIncrementerName() + " values()"); yields SQLException. It should be stmt.executeUpdate("insert into " + getIncrementerName() + " values(DEFAULT)"); instead.
See attached patch. This goes for all versions of SybaseMaxValueIncrementer.
Affects: 2.5.5
Referenced from: commits bd22bed
The text was updated successfully, but these errors were encountered: