-
Notifications
You must be signed in to change notification settings - Fork 26
Add boundary checking, improve buffered copier #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ffec118 to
d37ad7f
Compare
| // Test VARBINARY types | ||
| binaryData := []byte{0x01, 0x02, 0x03} | ||
| result := EscapeMySQLType("VARBINARY(255)", binaryData) | ||
| assert.Contains(t, result, "_binary") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this redundant with the following assertion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, what this does is checks that the collation hint is specified ahead of the string. So it doesn't use the connection's properties.
|
|
||
| for { | ||
| select { | ||
| case notification := <-ddlNotifications: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess if there's some other test watching for notifications, this will consume the notification and make the other test fail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the case. The replication client sends all DDL changes to the notification channel. Because the binary logs are shared, there is a race where it may occasionally get the DDL of another test. But the channels are not shared.
An alternative fix is that there could be filtering in the replication client to only send notifications for tables for which there are subscriptions. I didn't do this originally, but I could switch to it in future.
…mtocker-boundary-checking
91be8c7 to
407403f
Compare
A Pull Request should be associated with an Issue.
Fixes #471
Fixes #464
Fixes #461 (also fixed in #462 but I couldn't wait for this to merge).