test
This commit is contained in:
parent
e264120b04
commit
9748e83b93
4
sql.go
4
sql.go
@ -21,14 +21,14 @@ func initDB() {
|
|||||||
failOnError(err, "initDB : set foreign_key_checks = 0")
|
failOnError(err, "initDB : set foreign_key_checks = 0")
|
||||||
|
|
||||||
var name string
|
var name string
|
||||||
rows, err := tx.Query("show tables")
|
rows, err := db.Query("show tables")
|
||||||
failOnError(err, "initDB : show tables")
|
failOnError(err, "initDB : show tables")
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
err = rows.Scan(&name)
|
err = rows.Scan(&name)
|
||||||
failOnError(err, "initDB : show tables listing")
|
failOnError(err, "initDB : show tables listing")
|
||||||
|
|
||||||
_, err = db.Exec("drop table " + name)
|
_, err = tx.Exec("drop table " + name)
|
||||||
failOnError(err, "initDB : drop table "+name)
|
failOnError(err, "initDB : drop table "+name)
|
||||||
}
|
}
|
||||||
err = rows.Err()
|
err = rows.Err()
|
||||||
|
Loading…
Reference in New Issue
Block a user