|
From: JP P. <jp....@ti...> - 2003-06-03 03:37:15
|
It was a good idea to use a not transactional table type for the increment. It's the simplest way. Jean-Pierre > -----Message d'origine----- > De : spr...@li...=20 > [mailto:spr...@li...] > De la part de tri...@tr... > Envoy=E9 : samedi 31 mai 2003 20:12 > =C0 : tri...@tr... > Cc : Isabelle Muszynski;=20 > spr...@li... > Objet : Re: [Springframework-developer] Problem with=20 > MySqlMaxValueIncrementer >=20 >=20 > Isabelle and All, >=20 > I have commited my changes to the MySQLMaxValueIncrementer. =20 >=20 > You now declare the "sequence" table like this: > =20 > create table sequence (id int not null) type=3DMYISAM; > insert into sequence values(0); >=20 > No need for auto-increment for either table. The=20 > "type=3DMYISAM" is nor=20 > necessary, but it underscores that this table is not part of=20 > any transaction. >=20 > Everything else works the same. >=20 > I changed the increment logic to use >=20 > update sequence set id=3Dlast_insert_id(id+?); >=20 > where ? is the batch size. >=20 > This works fine during my testing. Let me know if you run in=20 > to any problems. >=20 > I'll make some changes to the OracleSequenceMaxValueIncrementer next. >=20 > --Thomas >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay!=20 > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 >=20 > _______________________________________________ >=20 > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |