mariadb 报错 The total number of locks exceeds the lock table size 的解决

1、问题描述

修改表某字段 decimal(10,2) 类型为 decimal(10,3),该表数据量约 2 亿行。执行时报如题错误。

2、解决方案

1)执行 show variables like "%_buffer%"; 查看当前 innodb_buffer_pool_size 参数,默认为 134217728(128M)

2)执行 SET GLOBAL innodb_buffer_pool_size= 1073741824,临时设置参数值为 1G

3、参考文献