[Zope] Locking MySQL tables via Z MySQL Database Connections

Sean Dunn sean at troublemakerstudios.com
Thu Aug 25 18:29:12 EDT 2005


I'm confused as to what the thread "scope rules" are between Zope and
MySQL.

 

I would like to be able to emulate transaction control in MySQL in a
Python script in Zope, but I'm unclear as to how the Z MySQL DB
Connection works, and what defines a "thread" for it? I need to be able
to LOCK tables, INSERT, SELECT, INSERT, and then UNLOCK the tables. But,
if I put each of these commands in separate Z SQL queries, and call them
each from a Python script, are they guaranteed to be in the same SQL
thread, so that their locking context will be the same, or will they all
be executed on different MySQL threads? Or...on the other extreme, does
every query from a Zope server use the same connection thread? And does
that thread simply exist until the connection times out and it has to
reconnect?

 

Thank you,

Sean

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20050825/547ffae5/attachment.htm


More information about the Zope mailing list