June 19, 2013

Post: SELECT LOCK IN SHARE MODE and FOR UPDATE

Innodb can only lock current version of row. Think about similar case and row being deleted. Even if Innodb would be able to set locks on rows… peices missing in Locking implementation of Innodb are: Lock table Innodb can lock tables but it will still need to set row level locks which is memory…

Post: InnoDB's gap locks

One of the most important features of InnoDB is the row level locking. This feature provides better concurrency under heavy write load but… those gap locks using SHOW ENGINE INNODB STATUS: —TRANSACTION 72C, ACTIVE 755 sec 4 lock struct(s), heap size 1248, 3 row lock(s), undo log entries 1 MySQL thread id 3, OS thread handle 0x7f84a78ba700, query id 163 localhost msandbox TABLE LOCK table…

Post: InnoDB: look after fragmentation

….765369 Lock_time: 0.000137 Rows_sent: 1 Rows_examined: 11569733 Rows_affected: 0 Rows_read: 11569733 # InnoDB_IO_r_ops: 38530 InnoDB_IO_r_bytes: 631275520 InnoDB_IO_r_wait: 0.204893 # InnoDB_rec_lock

Post: Innodb locking and Foreign Keys

… I was working with application which uses Innodb and foreign keys and got into locking problems possibly due to foreign keys, so… but not locking which also might be important. So lets talk how locks seems to work with foreign keys in Innodb. I’ve… will try to delete row in PARENT table lockup in CHILD table will be performed with row lock performed. Innodb is smart enough to…

Post: Avoiding auto-increment holes on InnoDB with INSERT IGNORE

lock algorithm for the auto_increment value is configurable and you can select from different algorithms using the innodb_autoinc_lock…the auto_increment counter: show create table foo\G *************************** 1. row *************************** Table: foo Create Table: CREATE TABLE `foo` ( `id` …

Post: ACTIVE with Locks – Now thats a problem !

… no 1098, OS thread id 1224980800 3 lock struct(s), heap size 368, 1 row lock(s), undo log entries 1 MySQL thread… lock struct(s), heap size 368, 1 row lock(s), undo log entries 2 In this case we see transactions are holding some locks… some other query will try to lock the same rows it will have to wait… possibly until innodb_lock_wait_timeout elapses and when…

Post: Percona Server 5.5.10 (Release Candidate)

…, ROWS_SENT, and ROWS_READ to table PROCESSLIST and to the output of SHOW PROCESSLIST. (Laurynas Biveinis) Variable Changes Old status variable innodb_row_lock_numbers was renamed to innodb_current_row_locks. (Yasufumi Kinoshita) Old system variable innodb_enable_unsafe_group_commit was deleted. The existing MySQL variable innodb

Post: InnoDB auto-inc scalability fixed

… column the special AUTO_INC table level lock is obtained, instead of usual row-level locks. With many concurrent inserted threads this causes… we had a lot of customers who was affected by InnoDB auto-inc. For several of them we even advised to… is the fix introduces new system variable innodb_autoinc_lock_mode which determines behavior of InnoDB for tables with autoinc. I do not…

Comment: InnoDB's gap locks

… over on DBA StackExchange: http://dba.stackexchange.com/questions/15854/innodb-row-locking-how-to-implement/15864#15864. I haven’t tested it…

Post: Paul McCullagh answers your questions about PBXT

InnoDB in REPEATABLE READ mode. On the other hand, there are currently no plans to implement InnoDB style “gap locking“. Gap locking effectively involves locking rows… read locks. A normal SELECT does not lock at all. In addition, an UPDATE or DELETE only acquires a temporary row-lock. This lock is…