Skip to content
Browse files

Update mysql/mysql.go

MySQL driver crashes if you get the database name wrong for your DataSource.
  • Loading branch information...
1 parent 96ebaa9 commit 8d27934f34362fe7cccad381924d81e613fb309a @rjmcguire committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 mysql/mysql.go
View
5 mysql/mysql.go
@@ -742,10 +742,13 @@ func (my *MysqlDataSource) Collection(name string) db.Collection {
// Fetching table datatypes and mapping to internal gotypes.
- rows, _ := t.parent.myExec(
+ rows, err := t.parent.myExec(
"Query",
"SHOW COLUMNS FROM", t.name,
)
+ if err != nil {
+ panic(err)
+ }
columns := t.myFetchAll(rows)

0 comments on commit 8d27934

Please sign in to comment.
Something went wrong with that request. Please try again.