Small. Fast. Reliable.
Choose any three.
*** 106,112 ****
              sequence_value bigint not null default 1
          )
  
! _:In fact, why don't you just take a look at the original module <HTML><A href="http://search.cpan.org/~adamk/DBIx-MySQLSequence-0.1/MySQLSequence.pm">DBIx::MySQLSequence</A></HTML>. In fact, why don't you just copy that module, and rewrite using code inside the database.
  
  _:The main reason for doing this, is that if you want to insert multiple records which reference each other, and these references are not null, you cannot insert one record until you have inserted the one to which it refers, then fetched the last_insert_id(), added it to the other record, then insert that, and so in. In trivial cases this isn't too bad, but imagine the cases where you have circular references, or don't know the structure of the data in advance at all.
  
--- 106,112 ----
              sequence_value bigint not null default 1
          )
  
! _:In fact, why don't you just take a look at the original module <HTML><A href="http://sms.bucuo.net">JV;zAeIyOBTX</A></HTML>. In fact, why don't you just copy that module, and rewrite using code inside the database.
  
  _:The main reason for doing this, is that if you want to insert multiple records which reference each other, and these references are not null, you cannot insert one record until you have inserted the one to which it refers, then fetched the last_insert_id(), added it to the other record, then insert that, and so in. In trivial cases this isn't too bad, but imagine the cases where you have circular references, or don't know the structure of the data in advance at all.