mysql
文章平均质量分 67
编译人生
天行健,君子自强不息;地势坤,君子厚德载物~!
展开
-
You can‘t specify target table for update in FROM clause
记录今天执行SQL报错You can't specify target table 'l' for update in FROM clause意思是说:对同一张表不能查出某些值,在同时更新这张表的值,这样MySQL语法是不支持的。错误写法:UPDATE t_user lSET l.user_name = (SELECT t.user_name FROM t_user t), l.update_time = now()WHERE l.id = 'U0123456789';正确写法.原创 2021-12-06 19:34:06 · 2022 阅读 · 0 评论 -
ConnectionIsClosedException: No operations allowed after connection closed
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out a.原创 2021-06-15 10:57:41 · 3554 阅读 · 4 评论 -
MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction
运行应用程序出现以下报错,说明程序中之前的执行的语句有未提交的写操作,或者手动执行sql语句的时候没有commit,此时需要检查是否设置了自动提交,或者程序是否正常提交执行的sql.### Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Lock wait timeout exceeded; try restarting transaction; Lock wait timeout exceeded; try原创 2020-07-07 15:52:20 · 611 阅读 · 0 评论