Could someone, who has experience with MySQL, help? My question relates to intention locking in InnoDB storage engine, MySQL. I am trying to get full understanding on how InnoDB manages transaction levels and currently reading the MySQL 5.6 Reference Manual, InnoDB Lock Modes section. And I am confused with intention shared and exclusive locks. It is written there that intention locks are table level locks and they indicate that a statement in a transaction willing to acquire a row level lock either for read (shared) or write (exclusive).
My questions are:
1) may I say that intention locking is entirely implicit table level locking; locks of this type are released immediately after the row level shared or exclusive lock was obtained (the execution of "select ... lock in share mode" or "select ... for update", etc. finishes);
2) is it possible to emulate session interaction via command line in order to see, how intention locking work?