a question about the usage of gh-ost when migrated

未关闭
#1,361 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 10 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
go, mysql
领域
databases

调研方向

从 issue 中显示的临时表 SQL 开始,追踪 gh-ost 在哪里使用 ASCII 字符集定义 hint 列和 value 列。将该行为与 MySQL 迁移要求进行比较,并确认更改字符集是否会保留工具的元数据;完成的标准是已回答兼容性问题,并且任何所需行为都由回归测试覆盖。

由索引模型根据 Issue 内容生成。

描述

Hello, I encountered a database migration failure while using gh-ost. The main reason is due to the use of the ASCII character set. The source database is MySQL, while the target database does not support the ASCII character set.

And I check that most temp table like "%_ghc" used contain hint&value in ascii:

q1: why not use utf8 or other charset that cover ascii(latin1,gbk or else)?
q2: can I just simplify use utf8 for hint&value?

 Query	create /* gh-ost */ table `test`.`_b_ghc` (
			id bigint auto_increment,
			last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
			hint varchar(64) charset ascii not null,
			value varchar(4096) charset ascii not null,
			primary key(id),
			unique key hint_uidx(hint)
		) auto_increment=256

主要语言
Go
星标
13.6k
派生
1.4k
平均合并
9 天 19 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-ost 的其他 Issue

查看 github/gh-ost 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。