On Jun 11, 2007, at 6:46 PM, Monty Taylor wrote:
>
> Um - transactions have happily been there since 3.23.15. :)
>
> So the "best" way to do this is to check the db version and see if
> it's
> greater than 3.23.15 or not.
>
> "show variables like 'version'" will do the trick to get you the
> v
Michael Bayer wrote:
>
> On Jun 8, 2007, at 2:17 PM, Andreas Jung wrote:
>
>>
>> --On 8. Juni 2007 14:05:39 -0400 Rick Morrison
>> <[EMAIL PROTECTED]> wrote:
>>
>>> try:
>>> t.commit()
>>> except:
>>> print 'Holy cow, this database is lame'
>>>
>>>
>> This code is also lame :-) The cod
On Jun 8, 2007, at 2:17 PM, Andreas Jung wrote:
>
>
> --On 8. Juni 2007 14:05:39 -0400 Rick Morrison
> <[EMAIL PROTECTED]> wrote:
>
>> try:
>> t.commit()
>> except:
>> print 'Holy cow, this database is lame'
>>
>>
>
> This code is also lame :-) The code should work
> for arbitrary DSNs
Well it's not so evil if all you're doing is testing to see if commit() is
available -- I wasn't trying to suggest that it was a great pattern for your
whole application.
On 6/8/07, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
>
>
> --On 8. Juni 2007 14:05:39 -0400 Rick Morrison <[EMAIL PROTECTED]>
>
--On 8. Juni 2007 14:05:39 -0400 Rick Morrison <[EMAIL PROTECTED]>
wrote:
try:
t.commit()
except:
print 'Holy cow, this database is lame'
This code is also lame :-) The code should work
for arbitrary DSNs and swallowing an exception while
committing is evil, evil, evil.
-aj
pgp
try:
t.commit()
except:
print 'Holy cow, this database is lame'
On 6/8/07, Andreas Jung <[EMAIL PROTECTED]> wrote:
>
> is there a way to determine if the underlying MySQL DB is able to perform
> a commit() operation? The following code fails (likely because the
> underlying MySQL db is p