przy zapytaniu UPDATE i SET w tabeli otrzymuje odpowiedź
LOCK wait timeout exceeded; try restarting transaction
Problem tyczy się tylko tych wierszy gdzie sa polskie znaki
SET GLOBAL innodb_lock_wait_timeout = 5000; SET innodb_lock_wait_timeout = 5000;
SELECT * FROM `information_schema`.`innodb_trx` ORDER BY `trx_started`;
trx_id trx_state trx_started trx_requested_lock_id trx_wait_started trx_weight trx_mysql_thread_id trx_query trx_operation_state trx_tables_in_use trx_tables_locked trx_lock_structs trx_lock_memory_bytes trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks trx_last_foreign_key_error trx_is_read_only trx_autocommit_non_locking 14890778 LOCK WAIT 2020-12-15 22:52 14890778:460:4:2 2020-12-15 22:52 2 8710313 UPDATE clients SET numOfDocs = (SELECT COUNT(id) FROM documents WHERE documents.clientId = clients.clientId) starting index read 2 1 2 1136 1 0 0 REPEATABLE READ 1 1 NULL 0 0 14890776 LOCK WAIT 2020-12-15 22:52 14890776:460:4:2 2020-12-15 22:52 2 8710220 UPDATE clients SET numOfDocs = (SELECT COUNT(id) FROM documents WHERE documents.clientId = clients.clientId) starting index read 2 1 2 1136 1 0 0 REPEATABLE READ 1 1 NULL 0 0 14890777 LOCK WAIT 2020-12-15 22:52 14890777:460:4:2 2020-12-15 22:52 2 8710203 UPDATE clients SET numOfDocs = (SELECT COUNT(id) FROM documents WHERE documents.clientId = clients.clientId) starting index read 2 1 2 1136 1 0 0 REPEATABLE READ 1 1 NULL 0 0 14890775 RUNNING 2020-12-15 22:51 NULL NULL 287 8710186 UPDATE clients SET numOfDocs = (SELECT COUNT(id) FROM documents WHERE documents.clientId = clients.clientId) fetching rows 2 2 287 41168 29924 0 0 REPEATABLE READ 1 1 NULL 0 0
SELECT * FROM `information_schema`.`innodb_locks`;
lock_id lock_trx_id lock_mode lock_type lock_table lock_index lock_space lock_page lock_rec lock_data 14890779:464:314:101 14890779 X RECORD `kolejka_test`.`documents` PRIMARY 464 314 101 29532 14890775:464:314:101 14890775 S RECORD `kolejka_test`.`documents` PRIMARY 464 314 101 29532