SELECT `r` . `trx_wait_started` AS `wait_started` , `timediff` ( NOW ( ) , `r` . `trx_wait_started` ) AS `wait_age` , TIMESTAMPDIFF ( SQL_TSI_SECOND , `r` . `trx_wait_started` , NOW ( ) ) AS `wait_age_secs` , `rl` . `lock_table` AS `locked_table` , `rl` . `lock_index` AS `locked_index` , `rl` . `lock_type` AS `locked_type` , `r` . `trx_id` AS `waiting_trx_id` , `r` . `trx_started` AS `waiting_trx_started` , `timediff` ( NOW ( ) , `r` . `trx_started` ) AS `waiting_trx_age` , `r` . `trx_rows_locked` AS `waiting_trx_rows_locked` , `r` . `trx_rows_modified` AS `waiting_trx_rows_modified` , `r` . `trx_mysql_thread_id` AS `waiting_pid` , `sys` . `format_statement` ( `r` . `trx_query` ) AS `waiting_query` , `rl` . `lock_id` AS `waiting_lock_id` , `rl` . `lock_mode` AS `waiting_lock_mode` , `b` . `trx_id` AS `blocking_trx_id` , `b` . `trx_mysql_thread_id` AS `blocking_pid` , `sys` . `format_statement` ( `b` . `trx_query` ) AS `blocking_query` , `bl` . `lock_id` AS `blocking_lock_id` , `bl` . `lock_mode` AS 