• The maximum column size is 767 bytes (Mysql)


     ERROR app.wsutils 419 INCRON: Error: ('HY000', '[HY000] [MySQL][ODBC 5.2(w) Driver][mysqld-5.7.7-rc-log]Index column size too large. The maximum column size is 767 bytes. (1709) (SQLExecDirectW)')

    网上查找解决方案是:

    set global innodb_file_format = BARRACUDA;
    set global innodb_large_prefix = ON;
    create table test (........) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

    或者:
    innodb_file_format = Barracuda
    innodb_file_per_table = 1
    innodb_large_prefix

    还有一种情况是:创建表的时候出现的:解决方式是:删除之前的索引:
    原文链接:http://stackoverflow.com/questions/24853828/index-column-size-too-large-the-maximum-column-size-is-767-bytes-for-int-dat

    摘录:
        CREATE TABLE IF NOT EXISTS  `db`.`TAGS` (
    
     `tag_id` INT( 11 ) NOT NULL ,
     `tag_text` VARCHAR( 700 ) NULL ,
     `date_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
     `xxx_id` INT( 11 ) NOT NULL COMMENT  'This is for ease of reference lookup later',
     `user_id` INT( 11 ) NOT NULL ,
     `TAG_FACT_RELATION_relation_id` INT NOT NULL ,
    PRIMARY KEY (  `tag_id` ) ,
    UNIQUE INDEX  `tag_UNIQUE` (  `tag_text` ASC ) ,
    UNIQUE INDEX  `tag_id_UNIQUE` (  `tag_id` ASC ) ,
    INDEX  `fk_TAGS_TAG_FACT_RELATION1_idx` (  `TAG_FACT_RELATION_relation_id` ASC ) ,
    CONSTRAINT  `fk_TAGS_TAG_FACT_RELATION1` FOREIGN KEY (  `TAG_FACT_RELATION_relation_id` ) REFERENCES  `meepl`.`TAG_FACT_RELATION` (
    `relation_id`
    ) ON DELETE NO ACTION ON UPDATE NO ACTION
    ) ENGINE = INNODB;

    There error says:

    #1709 - Index column size too large. The maximum column size is 767 bytes.

    其他mysql官方:设置innodb :
    https://dev.mysql.com/doc/refman/5.5/en/innodb-restrictions.html
  • 相关阅读:
    JQuery onload、ready概念介绍及使用方法
    jquery获取第几个元素的方法总结
    CSS中隐藏内容的3种方法及属性值
    jQuery获取页面及个元素高度、宽度【转】
    数据仓库原理<2>:数据仓库系统的体系结构
    数据仓库原理<1>:数据库与数据仓库
    题注在论文图表编号中的使用
    初见Python<7>:Python操作mysql
    初见Python<5>:条件、循环和其他语句
    初见Python<4>:字典
  • 原文地址:https://www.cnblogs.com/cbugs/p/6887955.html
Copyright © 2020-2023  润新知