niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » MySQL
effects of aquiring exclusive lock on subsequent reads inside same TX?
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
Nikita Tovstoles
*nix forums beginner


Joined: 20 Jul 2006
Posts: 1

PostPosted: Thu Jul 20, 2006 11:01 pm    Post subject: effects of aquiring exclusive lock on subsequent reads inside same TX? Reply with quote

Hi,

I'm running into lost of DB deadlocks would really appreciate answers to
the questions below which will help me diagnose the problem. I am
running MySQL 5 InnoDB, SERIALIZABLE mode.

Let's say we have:

1.TX1 START //assume autocommit is off
2.TX1 read on TableA
3.TX1 update on TableA
4.TX1 read on TableB
5.TX1 COMMIT

Is the following correct?
-In step2, TX1 obtains a SHARED lock. Is it applied to all rows in
TableA or only those returned by select statement?
-In step3, TX1 obtains an EXCLUSIVE lock. Does that lock out all of
TableA or only those rows that are being updated?
-In step4, does TX1 apply SHARED or EXCLUSIVE lock? is the lock applied
to all of TableB or only to rows returned by the select statement?

In general what is the effect (w/r/t locking) on selects performed after
a write operation within the same TX?

thanks a lot!

-nikita
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Mon Dec 01, 2008 7:01 pm | All times are GMT
navigation Forum index » Databases » MySQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts problems using oddmuse with mod_perl2 inside apache2.2 pe... Fergus McMenemie Perl 0 Fri Jul 21, 2006 9:48 am
No new posts Finding a point inside a polygon Mark Maunder MySQL 2 Thu Jul 20, 2006 11:10 pm
No new posts Unable to lock a file to stop sendmail writing to it GarfGarf Perl 4 Thu Jul 20, 2006 8:54 am
No new posts Mysql ver. 5.0.22-standard for sun-solaris2.10 (SPARC): E... Calselli, Fabrizio WI MySQL 1 Tue Jul 18, 2006 3:23 pm
No new posts Random Table Lock mysql@top-consulting.net MySQL 0 Mon Jul 17, 2006 11:39 am

Loans | Loans | Remortgages | Credit Check | Credit Cards
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1760s ][ Queries: 16 (0.1008s) ][ GZIP on - Debug on ]