zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

The total number of locks exceeds the lock table size,mysql update报错

mysql 报错 The of number Table update size
2023-09-11 14:21:08 时间

【1】mysql update报错 事情缘由

(1.1)前置信息

  1. mysql5.6 版本
  2. innodb_buffer_pool_size 只有 10M
  3. 被 update的表有 3kw+ 表数据库
  4. 被 update 表是 innodb,utf8 格式

The total number of locks exceeds the lock table size

 

【2】解决分析

(1)修改 innodb_buffer_pool_size (5.6不能在线改,坑啊)

(2)修改 tmp_table_size(试过,没什么用)

 

最终解决:

  还是查出主键id,然后一个一个 update过去,所幸我需要更新的行之后 5000来行;