New answers tagged lock
You can explicitly specify using : SET LOCK_TIMEOUT timeout_period timeout_period Is the number of milliseconds that will pass before Microsoft SQL Server returns a locking error. A value of -1 (default) indicates no time-out period (that is, wait forever). When a wait for a lock exceeds the time-out value, an error is returned. A value of 0 ...
also nice information can be found in MySQL default logs like mysqld.log, slow query log, binary logging and after executing the query 'SHOW STATUS' the variable (Table_locks_waited) will indicate if you have concurrency problems or not
MyISAM only locks for INSERT, UPDATE, and DELETE (a.k.a. DML) These issue full table locks each time (See MyISAM Documentation on Locking granularity). SELECTs get blocked by those statement. The exception is an INSERT with concurrent_insert=2 defined. Performing an explicit lock is unnecessary, although you are free to do so. You may need to check you ...
If the values for the 'id' are adjacent, like '1' and '2' in your example, including the case where they are not adjacent but there are no rows in the index with values in between them, then I would suggest that you are bumping into the index gap lock... which is part of "row" locking. InnoDB performs row-level locking in such a way that when it searches ...
Top 50 recent answers are included