Mod python - mysql lock
John Nagle
nagle at animats.com
Mon Mar 5 13:00:10 EST 2007
If you use MySQL 5, you get atomic transactions. The old
"LOCK" thing is becoming obsolete. Suggest getting a newer
MySQL and a newer MySQL book.
John Nagle
Jan Danielsson wrote:
> Roopesh wrote:
>
>>In my mod_python project I am using mysql as the database. There is
>>table card in which unique cards are stored. When a user request comes
>>he has to get a unique card. In this situation I want to use LOCK with
>>which I can prevent other users accessing the table. I tried excuting
>>"LOCK" command of mysql through python code, but it is not locking the
>>database. Any ideas why this isn't working and how can I do the same.
>>
>>//python code
>>sql = "LOCK TABLES card WRITE"
>>cursor.execute(sql)
More information about the Python-list
mailing list