dromara / MaxKey

🗝️MaxKey SSO ,Leading-Edge IAM-IDaas(Identity and Access Management) Product,业界领先的IAM-IDaas身份管理和认证产品,支持OAuth2.x、OpenID Connect、SAML2.0、JWT、CAS、SCIM等SSO标准协议,基于RBAC统一权限控制,实现用户生命周期管理,开源、安全、合规、自主可控。
https://www.maxkey.top
Apache License 2.0
1.51k stars 331 forks source link

ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help #188

Closed Michael2008S closed 6 months ago

Michael2008S commented 10 months ago

When create mxk_userinfo table meet below issue:

MariaDB [maxkey]> SHOW VARIABLES LIKE 'innodb_page_size';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| innodb_page_size | 16384 |
+------------------+-------+
1 row in set (0.001 sec)
MariaDB [maxkey]> CREATE TABLE `mxk_userinfo` (
    ->   `ID` varchar(45) NOT NULL COMMENT '编号',
    ->   `USERNAME` varchar(100) NOT NULL COMMENT '登录名',
    ->   `PASSWORD` varchar(500) NOT NULL COMMENT '密码',
    ->   `DECIPHERABLE` varchar(500) NOT NULL COMMENT 'DE密码',
    ->   `AUTHNTYPE` tinyint unsigned DEFAULT '1' COMMENT '认证类型',
    ->   `MOBILE` varchar(45) DEFAULT NULL COMMENT '手机号码',
    ->   `MOBILEVERIFIED` varchar(45) DEFAULT NULL COMMENT '手机号验证',
    ->   `EMAIL` varchar(45) DEFAULT NULL COMMENT '邮箱',
    ->   `EMAILVERIFIED` smallint unsigned DEFAULT NULL COMMENT '邮箱验证',
    ->   `DISPLAYNAME` varchar(45) DEFAULT NULL COMMENT '显示名称',
    ->   `NICKNAME` varchar(45) DEFAULT NULL COMMENT '昵称',
    ->   `PICTURE` longblob COMMENT '头像',
    ->   `TIMEZONE` varchar(45) DEFAULT 'Asia/Shanghai' COMMENT '时区',
    ->   `LOCALE` varchar(45) DEFAULT 'zh_CN' COMMENT '地址',
    ->   `PREFERREDLANGUAGE` varchar(45) DEFAULT 'zh_CN' COMMENT '语言偏好',
    ->   `PASSWORDQUESTION` varchar(45) DEFAULT NULL COMMENT '密码问题',
    ->   `PASSWORDANSWER` varchar(45) DEFAULT NULL COMMENT '密码答案',
    ->   `APPLOGINAUTHNTYPE` tinyint unsigned DEFAULT '0' COMMENT '应用登录认证类型',
    ->   `APPLOGINPASSWORD` varchar(45) DEFAULT NULL COMMENT '应用登录密码',
    ->   `PROTECTEDAPPS` varchar(450) DEFAULT NULL COMMENT '应用登录密码保护应用',
    ->   `THEME` varchar(45) DEFAULT 'default' COMMENT '主题',
    ->   `GRIDLIST` tinyint unsigned DEFAULT '0' COMMENT '应用列表类型',
    ->   `LOGINCOUNT` int unsigned DEFAULT '0' COMMENT '登录次数统计',
    ->   `ONLINE` tinyint unsigned DEFAULT '0' COMMENT '在线状态',
    ->   `STATUS` tinyint unsigned DEFAULT '1' COMMENT '用户状态',
    ->   `ISLOCKED` tinyint unsigned DEFAULT '1' COMMENT '锁定状态',
    ->   `UNLOCKTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '解锁时间',
    ->   `LASTLOGINIP` varchar(300) DEFAULT NULL COMMENT '最近登录IP地址',
    ->   `LASTLOGINTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近登录时间',
    ->   `LASTLOGOFFTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近注销时间',
    ->   `BADPASSWORDTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码错误时间',
    ->   `BADPASSWORDCOUNT` smallint unsigned DEFAULT NULL COMMENT '密码错误次数',
    ->   `PASSWORDLASTSETTIME` datetime DEFAULT '2020-01-01 01:01:01' COMMENT '最近密码修改时间',
    ->   `PASSWORDSETTYPE` tinyint unsigned DEFAULT '0' COMMENT '密码重置类型',
    ->   `SHAREDSECRET` varchar(500) DEFAULT NULL COMMENT 'TIME-OPT密钥',
    ->   `SHAREDCOUNTER` varchar(45) DEFAULT '0' COMMENT 'COUNTER-OPT密钥',
    ->   `USERTYPE` varchar(45) DEFAULT 'Customer' COMMENT '用户类型',
    ->   `USERSTATE` varchar(45) DEFAULT 'RESIDENT',
    ->   `EMPLOYEENUMBER` varchar(45) DEFAULT NULL COMMENT '工号',
    ->   `WINDOWSACCOUNT` varchar(45) DEFAULT NULL COMMENT 'AD域账号',
    ->   `DIVISION` varchar(45) DEFAULT NULL COMMENT '分支',
    ->   `COSTCENTER` varchar(45) DEFAULT NULL COMMENT '成本中心',
    ->   `ORGANIZATION` varchar(45) DEFAULT NULL COMMENT '机构',
    ->   `DEPARTMENTID` varchar(45) DEFAULT NULL COMMENT '部门编号',
    ->   `DEPARTMENT` varchar(45) DEFAULT NULL COMMENT '部门',
    ->   `JOBTITLE` varchar(45) DEFAULT NULL COMMENT '职务',
    ->   `JOBLEVEL` varchar(45) DEFAULT NULL COMMENT '工作职级',
    ->   `MANAGERID` varchar(45) DEFAULT NULL COMMENT '经理编号',
    ->   `MANAGER` varchar(45) DEFAULT NULL COMMENT '经理名字',
    ->   `ASSISTANTID` varchar(45) DEFAULT NULL COMMENT '助理编号',
    ->   `ASSISTANT` varchar(45) DEFAULT NULL COMMENT '助理名字',
    ->   `ENTRYDATE` varchar(45) DEFAULT NULL COMMENT '入司时间',
    ->   `STARTWORKDATE` varchar(45) DEFAULT NULL COMMENT '开始工作时间',
    ->   `QUITDATE` varchar(45) DEFAULT NULL COMMENT '离职日期',
    ->   `SORTORDER` tinyint unsigned DEFAULT '1' COMMENT '部门内排序',
    ->   `WORKEMAIL` varchar(45) DEFAULT NULL COMMENT '工作-邮件',
    ->   `WORKPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '工作-电话',
    ->   `WORKCOUNTRY` varchar(45) DEFAULT 'CHN' COMMENT '工作-国家',
    ->   `WORKREGION` varchar(45) DEFAULT NULL COMMENT '工作-省/市',
    ->   `WORKLOCALITY` varchar(45) DEFAULT NULL COMMENT '工作-城市',
    ->   `WORKSTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '工作-街道',
    ->   `WORKADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '工作-地址全称',
    ->   `WORKPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '工作-邮编',
    ->   `WORKFAX` varchar(45) DEFAULT NULL COMMENT '工作-传真',
    ->   `WORKOFFICENAME` varchar(500) DEFAULT NULL,
    ->   `GIVENNAME` varchar(45) DEFAULT NULL COMMENT '名',
    ->   `MIDDLENAME` varchar(45) DEFAULT NULL COMMENT '中间名',
    ->   `FAMILYNAME` varchar(45) DEFAULT NULL COMMENT '姓',
    ->   `HONORIFICPREFIX` varchar(45) DEFAULT NULL COMMENT '前缀',
    ->   `HONORIFICSUFFIX` varchar(45) DEFAULT NULL COMMENT '后缀',
    ->   `FORMATTEDNAME` varchar(400) DEFAULT NULL COMMENT '用户全名',
    ->   `IDTYPE` tinyint unsigned DEFAULT '0' COMMENT '证件类型',
    ->   `IDCARDNO` varchar(45) DEFAULT NULL COMMENT '证件号码',
    ->   `EDUCATION` varchar(200) DEFAULT NULL COMMENT '学历',
    ->   `GRADUATEFROM` varchar(500) DEFAULT NULL COMMENT '毕业院校',
    ->   `GRADUATEDATE` varchar(45) DEFAULT NULL COMMENT '毕业日期',
    ->   `MARRIED` tinyint unsigned DEFAULT '0' COMMENT '婚姻状态',
    ->   `BIRTHDATE` varchar(45) DEFAULT NULL COMMENT '生日',
    ->   `NAMEZHSPELL` varchar(100) DEFAULT NULL COMMENT '名字中文拼音',
    ->   `NAMEZHSHORTSPELL` varchar(45) DEFAULT NULL COMMENT '名字中文拼音简称',
    ->   `GENDER` tinyint unsigned DEFAULT NULL COMMENT '性别',
    ->   `WEBSITE` varchar(50) DEFAULT NULL COMMENT '个人主页',
    ->   `WEIXINFOLLOW` tinyint unsigned DEFAULT NULL COMMENT '微信关注',
    ->   `DEFINEIM` varchar(45) DEFAULT NULL COMMENT 'IM账号',
    ->   `HOMEEMAIL` varchar(45) DEFAULT NULL COMMENT '家庭-邮件',
    ->   `HOMEPHONENUMBER` varchar(45) DEFAULT NULL COMMENT '家庭-电话',
    ->   `HOMECOUNTRY` varchar(45) DEFAULT 'CHN' COMMENT '家庭-省/市',
    ->   `HOMEREGION` varchar(45) DEFAULT NULL COMMENT '家庭-市',
    ->   `HOMELOCALITY` varchar(45) DEFAULT NULL COMMENT '家庭-区',
    ->   `HOMESTREETADDRESS` varchar(45) DEFAULT NULL COMMENT '家庭-街道',
    ->   `HOMEADDRESSFORMATTED` varchar(45) DEFAULT NULL COMMENT '家庭-地址全称',
    ->   `HOMEPOSTALCODE` varchar(45) DEFAULT NULL COMMENT '家庭-邮编',
    ->   `HOMEFAX` varchar(45) DEFAULT NULL COMMENT '家庭-传真',
    ->   `EXTRAATTRIBUTE` varchar(4000) DEFAULT NULL COMMENT '用户扩展属性',
    ->   `CREATEDBY` varchar(45) DEFAULT NULL COMMENT '创建人',
    ->   `CREATEDDATE` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    ->   `MODIFIEDBY` varchar(45) DEFAULT NULL COMMENT '修改人',
    ->   `MODIFIEDDATE` datetime DEFAULT NULL COMMENT '修改时间',
    ->   `DESCRIPTION` varchar(400) DEFAULT NULL COMMENT '描述',
    ->   `LDAPDN` varchar(1000) DEFAULT NULL,
    ->   `INSTID` varchar(45) NOT NULL,
    ->   `Regionhistory` text,
    ->   `passwordhistory` text,
    ->   PRIMARY KEY (`ID`),
    ->   UNIQUE KEY `USERNAME_UNIQUE` (`USERNAME`),
    ->   KEY `EMPLOYEENUMBER_UNIQUE` (`EMPLOYEENUMBER`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='USER INFO DEFINE';
ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
shimingxy commented 6 months ago

建议自行PICTURE调整到MinIO中