Slide 51
Slide 51 text
InnoDBロックのデモ
### connection_1
SELECT * FROM city WHERE countrycode = 'USA' FOR UPDATE;
### connection_2
SELECT processlist_id, object_schema, object_name, index_name, lock_type,
lock_mode, lock_status, lock_data
FROM performance_schema.data_locks JOIN performance_schema.threads
USING(thread_id)
WHERE lock_status <> 'GRANTED';
SELECT processlist_id, object_schema, object_name, index_name, lock_type,
lock_mode, lock_status, lock_data
FROM performance_schema.data_locks JOIN performance_schema.threads
USING(thread_id)
WHERE lock_data LIKE '%USA%';