Skip to content

Fix unsigned columns - #160

Merged
shlomi-noach merged 7 commits into
masterfrom
fix-unsigned-columns
Aug 17, 2016
Merged

shlomi-noach merged 7 commits into
masterfrom
fix-unsigned-columns

Conversation

@shlomi-noach

@shlomi-noach shlomi-noach commented Aug 17, 2016 •

Copy link
Copy Markdown
Contributor

Storyline: #157

This PR checks and fixes unsigned datatypes.
It seems the binary log does not tell us whether int values are signed or unsigned. The go-mysql library assumes signed.

gh-ost uses its own understanding of migrated table structure to modify column type (on app side) on the fly from int to uint on all variations (8, 16, 32, 64).

This fixes a data-corruption problem which can go undetected without STRICT_ALL_TABLES.

  • contributed code is using same conventions as original code
  • code is formatted via gofmt (please avoid goimports)
  • code is built via ./build.sh
  • code is tested via ./test.sh

@shlomi-noach

Copy link
Copy Markdown
Contributor Author

This passes production tests

@shlomi-noach
shlomi-noach merged commit 825c64f into master Aug 17, 2016
@shlomi-noach
shlomi-noach deleted the fix-unsigned-columns branch August 17, 2016 11:22
@dveeden

dveeden commented Aug 18, 2016

Copy link
Copy Markdown
Contributor

I also hit this issue and can confirm that the fix seem to work.
Please make a new release (1.0.10?).

@shlomi-noach

Copy link
Copy Markdown
Contributor Author

https://github.com/github/gh-ost/releases/tag/v1.0.10 is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants