本文主要是介绍【Error】SQL报错:code: 100004084,message: SQL执行失败: (1118, ‘Row size too large. The maximum row size for,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错信息:
code: 100004084,message: SQL执行失败: (1118, 'Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs')
原因:
create table时一个row(一行)字段加起来,最大只能65535byte。
如果超过了的话,需要把其中的部分column的varchar size缩小。或者修改为TEXT。
demo:
CREATE TABLE IF NOT EXISTS `SSS`(`id` int(20) unsigned NOT NULL AUTO_INCREMENT,`WWWW` VARCHAR(1024),`IIIIIIII` int unsigned, `NNNNN` TEXT(65535), `add_time` datetime DEFAULT CURRENT_TIMESTAMP,`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,PRIMARY KEY ( `id` )
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
参考:https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html
这篇关于【Error】SQL报错:code: 100004084,message: SQL执行失败: (1118, ‘Row size too large. The maximum row size for的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!