You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
called Result::unwrap()on anErr value: sqlx error: error returned from database: 1071 (42000): Specified key was too long; max key length is 3072 bytes Caused by: 0: error returned from database: 1071 (42000): Specified key was too long; max key length is 3072 bytes 1: 1071 (42000): Specified key was too long; max key length is 3072 bytes
called
Result::unwrap()on an
Errvalue: sqlx error: error returned from database: 1071 (42000): Specified key was too long; max key length is 3072 bytes Caused by: 0: error returned from database: 1071 (42000): Specified key was too long; max key length is 3072 bytes 1: 1071 (42000): Specified key was too long; max key length is 3072 bytes
source mysql5.7->sink msyql8.4
结构迁移时,源库表结构历史遗留原因设计表字段长度过大,索引过长,在mysql5.7下可自行配置innodb_large_prefix参数自动截取索引前缀,不会报错
但在目标库中,mysql8移除了该参数,因此struct建议最好能够抓取索引长度,以避免此错误,增加容错性。
或增加一个用户选项来可选的控制容错:
例如: Index_exceeds_truncation_length:768(索引超长截取长度)
实际执行:ADD INDEX (index(768))
The text was updated successfully, but these errors were encountered: