我的代码中出现此错误。我试图在表上运行更新查询。有哪些临时和永久解决方案?
我在Spring Boot中使用mysql。
[2019-03-07 05:43:03] [E] [pool-3-thread-2] [UserDaoImpl] Error occurred while writing to database
org.springframework.dao.DeadlockLoserDataAccessException: PreparedStatementCallback; SQL [UPDATE user_data SET rece_num = ?, first_name = ?, last_name = ? where user_id = ?]; Deadlock found when trying to get lock; try restarting transaction; nested exception is com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction