Skip to content
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

Remove use of mysql.MySQLWarnings #1

Merged
merged 2 commits into from
Oct 3, 2017
Merged

Conversation

scottjg
Copy link
Contributor

@scottjg scottjg commented Oct 3, 2017

It was removed from the upstream mysql package in
go-sql-driver/mysql#676

It was removed from the upstream mysql package in
go-sql-driver/mysql#676
mysql.go Outdated
@@ -89,9 +89,6 @@ func (driver *Driver) Close() error {
func (driver *Driver) ensureVersionTableExists() error {
_, err := driver.db.Exec("CREATE TABLE IF NOT EXISTS " + tableName + " (version bigint not null primary key);")

if _, isWarn := err.(mysql.MySQLWarnings); err != nil && !isWarn {
return err
}
Copy link
Member

Choose a reason for hiding this comment

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

We must not continue if the error is not nil. Could you update your code to return the err instead?
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@gravis
Copy link
Member

gravis commented Oct 3, 2017

Thanks!

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