Skip to content

Conversation

@HemeraOne
Copy link
Contributor

fixes #299

@shuhaowu
Copy link
Contributor

Can you create a PR with only the fix for mediumint?

@HemeraOne HemeraOne force-pushed the 299-mediumint-unsigned-fixed branch from b4b6691 to 3f7118f Compare July 12, 2021 14:41
@HemeraOne
Copy link
Contributor Author

Done!

@shuhaowu
Copy link
Contributor

Thanks for the PR. Is it possible for you to add a test here? https://github.com/Shopify/ghostferry/blob/master/test/integration/types_test.rb

@HemeraOne
Copy link
Contributor Author

I can't get the ruby test thing to work on my machine, so I'm afraid I can't


const MaxUint24 = 1<<24 - 1

func NewUint24(val int32) *Uint24 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would take a int32 to byte conversion, which in itself would require some code which you might not want to put in that location as well

@shuhaowu
Copy link
Contributor

I can't get the ruby test thing to work on my machine, so I'm afraid I can't

Do you have an error? For ruby testing, you can use nix-shell to run it if you have that. Otherwise a standard install of Ruby with bundler should just work.

@HemeraOne
Copy link
Contributor Author

I can't get the ruby test thing to work on my machine, so I'm afraid I can't

Do you have an error? For ruby testing, you can use nix-shell to run it if you have that. Otherwise a standard install of Ruby with bundler should just work.

/usr/lib/ruby/2.7.0/mkmf.rb:1050:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)
        from /usr/lib/ruby/2.7.0/mkmf.rb:1050:in `collect'
        from /usr/lib/ruby/2.7.0/mkmf.rb:1050:in `find_library'
        from extconf.rb:87:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.7.0/gems/mysql2-0.5.3 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/mysql2-0.5.3/gem_make.out

An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  mysql2
make: *** [Makefile:68: test-ruby] Error 5

@HemeraOne HemeraOne closed this Jul 12, 2021
@HemeraOne
Copy link
Contributor Author

there seems to be more issues, will look further tomorrow

@shuhaowu
Copy link
Contributor

you need mysql client development headers installed on your computer to install mysql2. libmysqlclient-dev for something like ubuntu.

there seems to be more issues, will look further tomorrow

Having a comprehensive integration test may help you iron out all the issue in one go.

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.

unsigned mediumint value through binlog streamer wrongfully parsed

2 participants