Suppose I have the following piece of code .
try {
connection.setAutoCommit(false) ;
....
....
connection.commit();
}
catch (Exception e)
{
}
Does the above transaction acquires locks on the MySQL tables which are referenced in the code in the try statement ? If it does, what kind of locks are these ? Are these read locks or write locks ? Also, does it make a row level lock or a complete lock on the table ?