出现system lock很正常,只要有表级锁就会出现,这跟你日志中执行的SQL内容有直接关系,在应用日志时这种信息很常见,通常都是很快的过去了,有的很快就没了,有的很长,你去从库看,通常在复制的时候show slave status结果 这种system lock也很多。
官方文档对system lock说的也不是很详细:
The thread has called mysql_lock_tables() and the thread state has not been updated since. This is a very general state that can occur for many reasons.
For example, the thread is going to request or is waiting for an internal or external system lock for the table. This can occur when InnoDB waits for a table-level lock during execution of LOCK TABLES. If this state is being caused by requests for external locks and you are not using multiple mysqld servers that are accessing the same MyISAM tables, you can disable external system locks with the --skip-external-locking option. However, external locking is disabled by default, so it is likely that this option will have no effect. For SHOW PROFILE, this state means the thread is requesting the lock (not waiting for it).