1.出现异常:java.sql.SQLException: The total number of locks exceeds the lock table size。
当你使用InnoDB 存储引擎处理此类问题时候,当你操作的表的行数超过了一定范围,就会遇到这样的错误。
(1)通过设置变量解决此 问题,增加空间开销
SHOW VARIABLES LIKE "%_buffer%";
set @innodb_buffer_pool_size = 268435456; ## 256M
(2)为了使配置生效,需要重新启动mysql服务。
- windows下进入cmd命令行窗口。
- 停止 命令 : net stop mysql
- 启动 命令 : net start mysql