I have 2 location in my web application that updating the tables: 'my_aspnet_membership', 'my_aspnet_users'.
The updates run on separate threads and cause deadlock.
The updates are part of 2 functions in "MySql Membership Provider":
1. ValidateUser()
2. GetUser()
I'm updating the same row all the time (for the same membership user).
These queries are part of "MySql Membership Provider" that cause the deadlock:
First query: (called from VerifyUser())
UPDATE my_aspnet_membership m, my_aspnet_users u SET u.lastActivityDate = '2012-11-29 18:35:46.380', m.LastActivityDate='2012-11-29 18:35:46.380' WHERE m.userId=1 AND u.id=1
Second Query: (called from GetUser())
BEGIN
UPDATE my_aspnet_users SET lastActivityDate = '2012-11-29 18:35:46.384' WHERE id=1
UPDATE my_aspnet_membership SET LastActivityDate='2012-11-29 18:35:46.384' WHERE userId=1
COMMIT
Thanks.
The updates run on separate threads and cause deadlock.
The updates are part of 2 functions in "MySql Membership Provider":
1. ValidateUser()
2. GetUser()
I'm updating the same row all the time (for the same membership user).
These queries are part of "MySql Membership Provider" that cause the deadlock:
First query: (called from VerifyUser())
UPDATE my_aspnet_membership m, my_aspnet_users u SET u.lastActivityDate = '2012-11-29 18:35:46.380', m.LastActivityDate='2012-11-29 18:35:46.380' WHERE m.userId=1 AND u.id=1
Second Query: (called from GetUser())
BEGIN
UPDATE my_aspnet_users SET lastActivityDate = '2012-11-29 18:35:46.384' WHERE id=1
UPDATE my_aspnet_membership SET LastActivityDate='2012-11-29 18:35:46.384' WHERE userId=1
COMMIT
Thanks.