Hi, thanks for the patch! Sorry for the late reply!
I got problems running the patched version of SequenceManagerNativeImpl against the NativeIdentifierTest junit-test. "Old" version pass the test without problems, integrating your patch one test case fails. I checked in new tests. Please get latest from CVS src/test/org/apache/ojb/broker/sequence/NativeIdentifierTest.java src/java/org/apache/ojb/broker/util/sequence/SequenceManagerNativeImpl.j ava Does the actual version of NativeIdentifierTest pass with your modified SequenceManagerNativeImpl (test only works with hsql and mysql, I only run against hsql)? > > Though I'm very suprised about you don't want to support > SequenceManagerMySQLImpl. > I don't like SequenceManagerNativeImpl because > SequenceManagerNativeImpl.getUniqueLong returns -1. > I really don't like that. And MySQL dosen't work properly with -1. > > I want SequenceManagerNativeImpl to support init property to define > this value. That can be 0 or -1. And it must be depend on DB type. > we can use a custom attribute to make this configurable. But when I set 0 as return value most test cases fail (NativeIdentifierTest) > Yesterday, I found another bug in SequenceManagerMySQLImpl. > MySQL returns long array SELECT LAST_INSERT_ID() query, > so getting new id takes long time when table has many records. > Just adding ' LIMIT 1 ' at the end fixes this performance problem. > sorry I'm not a "DB-guy", so have patience with me ;-) do you mean "SELECT LAST_INSERT_ID() "+tablename+" LIMIT 1" ?? regards, Armin > regards, > > -- shivaken > antshell: Ant command line front end > http://www.antshell.org > ------------------------------------------------------------------------ -------- > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
