good morning!!!!

Skip to content
Snippets Groups Projects
Commit 8d27934f authored by rjmcguire's avatar rjmcguire
Browse files

Update mysql/mysql.go

MySQL driver crashes if you get the database name wrong for your DataSource.
parent 96ebaa98
No related branches found
No related tags found
No related merge requests found
...@@ -742,10 +742,13 @@ func (my *MysqlDataSource) Collection(name string) db.Collection { ...@@ -742,10 +742,13 @@ func (my *MysqlDataSource) Collection(name string) db.Collection {
// Fetching table datatypes and mapping to internal gotypes. // Fetching table datatypes and mapping to internal gotypes.
rows, _ := t.parent.myExec( rows, err := t.parent.myExec(
"Query", "Query",
"SHOW COLUMNS FROM", t.name, "SHOW COLUMNS FROM", t.name,
) )
if err != nil {
panic(err)
}
columns := t.myFetchAll(rows) columns := t.myFetchAll(rows)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment