0

我的表结构:

CREATE TABLE `goal_review` (
    `id` BIGINT(25) NOT NULL AUTO_INCREMENT,
    `user_review_info` BIGINT(25) UNSIGNED NOT NULL DEFAULT '0',
    `SKILL_COMPETENCY_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `SKILL_COMPETENCY_OBJECTIVE` LONGTEXT NULL,
    `SKILL_COMPETENCY_CONDITION` LONGTEXT NULL,
    `SKILL_COMPETENCY_MEASURE` LONGTEXT NULL,
    `SKILL_COMPETENCY_TIMING` LONGTEXT NULL,
    `SKILL_COMPETENCY_TYPE` LONGTEXT NULL,
    `SKILL_COMPETENCY_WEIGHTAGE` LONGTEXT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `SKILL_COMPETENCY_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `SKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `PROJECT_DELIVERY_OBJECTIVE` LONGTEXT NULL,
    `PROJECT_DELIVERY_CONDITION` LONGTEXT NULL,
    `PROJECT_DELIVERY_MEASURE` LONGTEXT NULL,
    `PROJECT_DELIVERY_TIMING` LONGTEXT NULL,
    `PROJECT_DELIVERY_TYPE` LONGTEXT NULL,
    `PROJECT_DELIVERY_WEIGHTAGE` LONGTEXT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `PROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `BUSINESS_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `BUSINESS_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `BUSINESS_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `BUSINESS_OBJECTIVE` LONGTEXT NULL,
    `BUSINESS_CONDITION` LONGTEXT NULL,
    `BUSINESS_MEASURE` LONGTEXT NULL,
    `BUSINESS_TIMING` LONGTEXT NULL,
    `BUSINESS_TYPE` LONGTEXT NULL,
    `BUSINESS_WEIGHTAGE` LONGTEXT NULL,
    `BUSINESS_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `BUSINESS_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `COMPLIANCE_OBJECTIVE` LONGTEXT NULL,
    `COMPLIANCE_CONDITION` LONGTEXT NULL,
    `COMPLIANCE_MEASURE` LONGTEXT NULL,
    `COMPLIANCE_TIMING` LONGTEXT NULL,
    `COMPLIANCE_TYPE` LONGTEXT NULL,
    `COMPLIANCE_WEIGHTAGE` LONGTEXT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `COMPLIANCE_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_MID_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_MID_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_ANNUAL_REVIEW_SELF_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_ANNUAL_REVIEW_MANAGER_COMMENTS` LONGTEXT NULL,
    `LONG_TERM_OBJECTIVE` LONGTEXT NULL,
    `LONG_TERM_CONDITION` LONGTEXT NULL,
    `LONG_TERM_MEASURE` LONGTEXT NULL,
    `LONG_TERM_TIMING` LONGTEXT NULL,
    `LONG_TERM_TYPE` LONGTEXT NULL,
    `LONG_TERM_WEIGHTAGE` LONGTEXT NULL,
    `LONG_TERM_ANNUAL_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_MID_REVIEW_SELF_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_ANNUAL_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    `LONG_TERM_MID_REVIEW_MANAGER_RATING` INT(10) UNSIGNED NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    INDEX `FK_goal_review_user_review_info` (`user_review_info`),
    INDEX `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING` (`SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRSKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING` (`SKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING` (`SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRSKILL_COMPETENCY_MID_REVIEW_SELF_RATING` (`SKILL_COMPETENCY_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING` (`PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING` (`PROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING` (`PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRPROJECT_DELIVERY_MID_REVIEW_SELF_RATING` (`PROJECT_DELIVERY_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRBUSINESS_ANNUAL_REVIEW_MANAGER_RATING` (`BUSINESS_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRBUSINESS_MID_REVIEW_MANAGER_RATING` (`BUSINESS_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRBUSINESS_ANNUAL_REVIEW_SELF_RATING` (`BUSINESS_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRBUSINESS_MID_REVIEW_SELF_RATING` (`BUSINESS_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRCOMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING` (`COMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRCOMPLIANCE_MID_REVIEW_MANAGER_RATING` (`COMPLIANCE_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRCOMPLIANCE_ANNUAL_REVIEW_SELF_RATING` (`COMPLIANCE_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRCOMPLIANCE_MID_REVIEW_SELF_RATING` (`COMPLIANCE_MID_REVIEW_SELF_RATING`),
    INDEX `FK_GRLONG_TERM_ANNUAL_REVIEW_MANAGER_RATING` (`LONG_TERM_ANNUAL_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRLONG_TERM_MID_REVIEW_MANAGER_RATING` (`LONG_TERM_MID_REVIEW_MANAGER_RATING`),
    INDEX `FK_GRLONG_TERM_ANNUAL_REVIEW_SELF_RATING` (`LONG_TERM_ANNUAL_REVIEW_SELF_RATING`),
    INDEX `FK_GRLONG_TERM_MID_REVIEW_SELF_RATING` (`LONG_TERM_MID_REVIEW_SELF_RATING`),
    CONSTRAINT `FK_GRLONG_TERM_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`LONG_TERM_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRLONG_TERM_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`LONG_TERM_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRLONG_TERM_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`LONG_TERM_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRLONG_TERM_MID_REVIEW_SELF_RATING` FOREIGN KEY (`LONG_TERM_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_goal_review_user_review_info` FOREIGN KEY (`user_review_info`) REFERENCES `user_review_info` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`BUSINESS_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`BUSINESS_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`BUSINESS_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRBUSINESS_MID_REVIEW_SELF_RATING` FOREIGN KEY (`BUSINESS_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`COMPLIANCE_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`COMPLIANCE_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`COMPLIANCE_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRCOMPLIANCE_MID_REVIEW_SELF_RATING` FOREIGN KEY (`COMPLIANCE_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`PROJECT_DELIVERY_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`PROJECT_DELIVERY_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`PROJECT_DELIVERY_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRPROJECT_DELIVERY_MID_REVIEW_SELF_RATING` FOREIGN KEY (`PROJECT_DELIVERY_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING` FOREIGN KEY (`SKILL_COMPETENCY_ANNUAL_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING` FOREIGN KEY (`SKILL_COMPETENCY_ANNUAL_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING` FOREIGN KEY (`SKILL_COMPETENCY_MID_REVIEW_MANAGER_RATING`) REFERENCES `appraisal_rating` (`ID`),
    CONSTRAINT `FK_GRSKILL_COMPETENCY_MID_REVIEW_SELF_RATING` FOREIGN KEY (`SKILL_COMPETENCY_MID_REVIEW_SELF_RATING`) REFERENCES `appraisal_rating` (`ID`)
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB;

我可以插入最少的数据,但我什至无法为LONGTEXT字段插入 500 个字符。

我尝试了BLOBs,而TEXT不是LONG TEXT.

4

3 回答 3

0

Blob 用于以二进制格式存储数据,而 TEXT 用于存储大字符串。

BLOB 值被视为二进制字符串。它们没有字符集,排序和比较基于列值中字节的数值。

TEXT 值被视为非二进制字符串(字符串)。它们有一个字符集,并且根据字符集的排序规则对值进行排序和比较。

文本格式的消息几乎总是应存储为 TEXT。

于 2013-03-13T07:33:47.213 回答
0

嗨朋友们,错误是我自己。mysql 必须为每一列写入文件 longtext 或 text 这个文件信息只存储在 table 中。这个文件需要唯一的名字这个名字是由我们的输入生成的。我尝试为所有列输入相同的输入。所以 mysql 引擎从我的输入中获取该索引太长(对于唯一文件名),这就是为什么它需要更多的行大小超过 65,535 字节。我尝试输入 mysql 引擎没有错误的不同输入。如果我的想法有误,请
再次给 Jeevan Patil 你的答案,以便快速回复

于 2013-03-15T05:08:54.767 回答
0

这可能是一个更复杂的问题,但出于开发目的,只需添加my.cnf/my.ini

[mysqld]
#...
innodb_strict_mode = 0
于 2020-04-13T11:54:10.410 回答