[Zope] atomic operations
Thu, 26 Jul 2001 11:45 -0700
You aren't having to worry about this. last_insert_id is per connection, and not confused by activitiy across connections. Otherwise, mySQL is decidely non-transactional. postgresql has that.
> ------------ Original Message -----------
> From: Gustavo Vieira Goncalves Coelho Rios <gustavo@ifour.com.br>
> Date: Thu, 26 Jul 2001 15:26:02 -0300
>
> Hi folks!
>
> I have a table it has an auto increment fields. How could i have the id id
> insert by my last query atomically? I know i could use last_insert_id()
> function with MySQL, but since my mysql handler is shared by many instances of
> Zope, i cannot garantee that no other query runs between the insert and
> the select last_insert_id queries.
>
> Any ideia ?
>
> --
> There is only one thing in the world worse than being talked about, and
> that is not being talked about.
> -- Oscar Wilde
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )