Skip to content

Allow users to define ctl_connection_settings and the option to fail when table information is unavailable #176

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

Merged
merged 9 commits into from
Nov 22, 2016

Conversation

kdparker
Copy link
Contributor

@kdparker kdparker commented Nov 4, 2016

Resolves #56
To allow users to create their own secondary database that tracks schema changes if they want to ensure they will always have table_metadata (in case of a dropped table before a message can be picked up). It also adds an (optional) parameter that makes the BinLogStreamReader raise an exception if there is an issue getting schema information for a query. This allows the library to stay low-level while giving users the option of alleviating this issue.

@kdparker
Copy link
Contributor Author

kdparker commented Nov 4, 2016

By the way, if you want me to squash these commits, let me know.

Copy link
Collaborator

@baloo baloo left a comment

Choose a reason for hiding this comment

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

This looks good to me, but a test for the ctl connection settings would be great.

@@ -37,6 +37,9 @@ _build
*.xml
*.iml

# Temp vim .swp s
*.swp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pro tip: this should go in your global ignore file instead. Defaults to: $HOME/.config/git/ignore

This is not blocking for merge though.

self.__connection_settings = connection_settings
self.__connection_settings["charset"] = "utf8"
if not connection_settings.get("charset"):
self.__connection_settings["charset"] = "utf8"
Copy link
Collaborator

Choose a reason for hiding this comment

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

self.__connection_settings.setdefault("charset", "utf8")

@julien-duponchelle
Copy link
Owner

I agree the change sound good. If you can add a test for ctl_connection_settings it will be perfect

…nore, made default charset applying simpler, fixed travis for new mysql servers necessary for ctl_connection_settings test (including removing usage of mysql sandbox in mysql57 tests to bring it in line with what's going on in mysql56 tests)
@kdparker
Copy link
Contributor Author

Tests are done and working now (sorry for commit spam earlier, they're all squashed now)

@baloo
Copy link
Collaborator

baloo commented Nov 22, 2016

\o/ I started looking at implementing the tests myself, and I have to admit I became quite lazy when looking at the travis mess. Thank you very much for your work. All looks good to me.

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.

4 participants