On Sat, Feb 16, 2008 at 09:37:58PM -0500, Nathan Edwards wrote:
> sqlhub.processConnection = connectionForURI(connuri)
>
> class AAA(SQLObject):
> class sqlmeta:
> createSQL = {'mysql': 'ALTER TABLE aa_a ENGINE InnoDB'}
> cacheValues = False
> value = IntCol(alternateID=True)
>
> def thr1():
> localData = threading.local()
> localData.conn = connectionForURI(connuri)
Shouldn't that be
sqlhub.threadConnection = connectionForURI(connuri)
?
> for i in range(1000):
> try:
> a = AAA(value=1,connection=localData.conn)
> except dberrors.DuplicateEntryError:
> a = AAA.byValue(1,connection=localData.conn)
for i in range(1000):
try:
a = AAA(value=1)
except dberrors.DuplicateEntryError:
a = AAA.byValue(1)
> AAA.dropTable(ifExists=True)
> AAA.createTable()
>
> for i in range(20):
> t = threading.Thread(target=thr1,args=())
> t.start()
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss