[Err] 1709 - Index column size too large. The maximum column size is 767 bytes.
描述
[Err] 1709 - Index column size too large. The maximum column size is 767 bytes.
[Err] CREATE INDEX `groups_1` ON `groups` (`name`);
其實這個“ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes”錯誤是指超出索引位元組的限制,並不是指欄位長度限制。在官方文件“Limits on InnoDB Tables”有關於這方面的介紹、描述(詳情請見參考資料):
解決方案
1:啟用系統變數innodb_large_prefix
注意:光有這個系統變數開啟是不夠的。必須滿足下面幾個條件:
1: 系統變數innodb_large_prefix為ON
2: 系統變數innodb_file_format為Barracuda
3: ROW_FORMAT為DYNAMIC或COMPRESSED
mysql> show variables like '%innodb_large_prefix%';
+---------------------+-------+
| Variable_name | Value |
+---------------------+-------+
| innodb_large_prefix | ON |
+---------------------+-------+
1 row in set (0.00 sec)
mysql> set global innodb_large_prefix=on;
mysql> show variables like '%innodb_file_format%';
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Barracuda |
| innodb_file_format_check | ON |
| innodb_file_format_max | Barracuda |
+--------------------------+-----------+
3 rows in set (0.00 sec)
mysql> set global innodb_file_format=Barracuda;
Query OK, 0 rows affected (0.00 sec)
use zabbix_proxy
mysql> show table status from MyDB where name='TEST'\G;
*************************** 1. row ***************************
Name: TEST
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 0
Avg_row_length: 0
Data_length: 16384
Max_data_length: 0
Index_length: 16384
Data_free: 0
Auto_increment: NULL
Create_time: 2018-09-20 13:53:49
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
mysql> ALTER TABLE TEST ROW_FORMAT=DYNAMIC;
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> show table status from MyDB where name='TEST'\G;
*************************** 1. row ***************************
Name: TEST
Engine: InnoDB
Version: 10
Row_format: Dynamic
Rows: 0
Avg_row_length: 0
Data_length: 16384
Max_data_length: 0
Index_length: 16384
Data_free: 0
Auto_increment: NULL
Create_time: 2018-09-20 14:04:05
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options: row_format=DYNAMIC
Comment:
1 row in set (0.00 sec)
ERROR:
No query specified
mysql> ALTER TABLE TEST MODIFY CODE_VALUE1 VARCHAR(350);
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0
參考連結 https://www.cnblogs.com/kerrycode/p/9680881.html
相關文章
- 1709 - Index column size too large. The maximum column size is 767 bytes.Index
- Index column size too large. The maximum column size is 767 bytes.Index
- mysql specified key was too long與Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- mysql5.7 資料匯入5.6 Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- MySQL建立表失敗:Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL 5.7 到 5.6,出現 Index column size too large. The maximum column size is 767 bytesMySqlIndex
- MySQL資料庫index column size too large. the maximum column size is 767 bytes問題解決MySql資料庫Index
- mysql Index column size too large 超過767錯誤解決方案(轉)MySqlIndex
- #1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs
- data too long for column
- ORA-12899: value too large for column ORG_NAME (actual: 145, maximum: 128)
- Bug 31625618 DML Over a LOB Column ORA-3137 [3146]When the Bind Size is > 256k
- Row size too large (> 8126)解決辦法
- java.lang.IndexOutOfBoundsException: Index: 0, Size: 0JavaIndexException
- Unhandled rejection RangeError: Maximum call stack size exceededill install loadIdealTreeErrorIdea
- ORA-01144: File size (4224000 blocks) exceeds maximum of 4194303BloC
- ProTable 報錯Uncaught RangeError: Maximum call stack size exceededError
- Mysql 報Row size too large 65535解決方法MySql
- [20180608]Wrong Results with IOT, Added Column and Secondary Index.txtIndex
- js中Uncaught RangeError: Maximum call stack size exceeded錯誤JSError
- [20180609]Wrong Results with IOT, Added Column and Secondary Index2.txtIndex
- 修改SharePoint上傳檔案大小限制(Changing Maximum Upload Size)
- 關於錯誤訊息 RangeError - Maximum call stack size exceeded at XXXError
- OGG-01163 Bad column length (32) specified for column in table
- Vue專案中出現:Maximum call stack size exceeded(堆疊溢位)Vue
- iis 0x80070032 Cannot read configuration file because it exceeds the maximum file size
- [20200904]12c invisible column impdp segment_column_id.txt
- Sorting arrays in NumPy by column
- CSS column-gapCSS
- CSS column-ruleCSS
- CSS column-widthCSS
- CSS column-spanCSS
- 5.6.7. Renaming a Column
- gitignore by file size?Git
- pymysql.err.OperationalError: (1136, “Column count doesn‘t match value count at row 1“)報錯反省。MySqlError
- height_scale = scales[2] IndexError: index 2 is out of bounds for axis 0 with size 0IndexError
- ExtJs的Column佈局JS
- alter table set unused column