After upgrading to latest Turbogears SVN (r801) and to latest SQLObject (r1616,
0.7-bugfix) I get weird lock error when trying to destroy an SQLObject's
instance. I cross-posting this to TurboGears group because this may have
something with its AutoHubs feature.
I'm running MySQL 4.1 on Windows XP SP2. Python 2.4.
Sample session:
>>> from turbogears.identity.soprovider import TG_User, TG_Group
>>> u1=TG_User(userId='max', password='x', emailAddress='', displayName='')
>>> u1
<TG_User 1L userId=u'max' emailAddress=u'' displayName=u'' password=u'x'
created='datetime.datetime...)'>
>>> u1.destroySelf()
[ here it hangs for about a minute ]
Traceback (most recent call last):
File "<console>", line 1, in ?
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\inheritance\__init__.py",
line 242, in destroySelf
super(InheritableSQLObject, self).destroySelf()
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\main.py",
line 1462, in destroySelf
self._connection._SO_delete(self)
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\dbconnection.py",
line 801, in _SO_delete
return self._dbConnection._SO_delete(inst)
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\dbconnection.py",
line 618, in _SO_delete
self.query("DELETE FROM %s WHERE %s = %s" %
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\dbconnection.py",
line 329, in query
return self._runWithConnection(self._query, s)
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\dbconnection.py",
line 242, in _runWithConnection
val = meth(conn, *args)
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\dbconnection.py",
line 326, in _query
self._executeRetry(conn, conn.cursor(), s)
File
"c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1613-py2.4.egg\sqlobject\mysql\mysqlconnection.py",
line 66, in _executeRetry
return cursor.execute(query)
File "C:\Python24\lib\site-packages\MySQLdb\cursors.py", line 137, in execute
self.errorhandler(self, exc, value)
File "C:\Python24\lib\site-packages\MySQLdb\connections.py", line 33, in
defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1205, 'Lock wait timeout exceeded; try restarting
transaction')
Same session with debug=1:
>>> from turbogears.identity.soprovider import TG_User, TG_Group
>>> u1=TG_User(userId='max', password='x', emailAddress='', displayName='')
1/QueryIns: INSERT INTO tg_user (display_name, created, email_address,
password, user_id, child_name) VALUES ('', '2006-02-21 11:06:31', '',
x', 'max', NULL)
1/QueryOne: SELECT child_name, user_id, email_address, display_name,
password, created FROM tg_user WHERE id = 2
>>> u1.destroySelf()
2/Query : DELETE FROM tg_user WHERE id = 2
[ hangs here ]
I'm crushed. ;-(
Can at least someone is able to reproduced this?
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss