We don't bite newbies here... much | |
PerlMonks |
Re^4: portable mysql auto_incrementby mpeppler (Vicar) |
on Oct 25, 2002 at 15:34 UTC ( [id://208041]=note: print w/replies, xml ) | Need Help?? |
Well - to start off DBIx::Sequence doesn't work with Sybase (and probably won't work with MS-SQL). Running it without creating the tables first generates the following error:
Creating the tables manually and running a basic loop to get new IDs generates the following error: The reason for this is that this module doesn't properly fetch all results after executing queries - and this leaves the various statement handles that it creates in an unstable state when used with DBD::Sybase. In addition, pre-preparing 5 or 6 queries works really well with Oracle, but is not a good idea with Sybase, because this will open 5 or 6 connections to the server for each instance of DBIx::Sequence. After patching the code so that it will work with Sybase I ran three concurrent processes that did nothing but fetch new IDs. The result was that only one process actually got any IDs - the other two were effectively locked out. Admittedly this is an extreme use of the module, but it does show the limits that this technique can have. Michael
In Section
Seekers of Perl Wisdom
|
|