Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func isTiDB(db *sql.DB) bool {
return true
}

func (t *tester) addConnection(connName, hostName, userName, password, db string) {
func (t *tester) addConnection(q query, connName, hostName, userName, password, db string) {
var (
mdb *sql.DB
err error
Expand All @@ -194,7 +194,7 @@ func (t *tester) addConnection(connName, hostName, userName, password, db string
}
if err != nil {
if t.expectedErrs == nil {
log.Fatalf("Open db err %v", err)
log.Fatalf("addConnection line: %d connect(%s) Open db err %v", q.Line, q.Query, err)
}
t.expectedErrs = nil
return
Expand Down Expand Up @@ -414,7 +414,7 @@ func (t *tester) Run() error {
for i := 0; i < 4; i++ {
args = append(args, "")
}
t.addConnection(args[0], args[1], args[2], args[3], args[4])
t.addConnection(q, args[0], args[1], args[2], args[3], args[4])
case Q_CONNECTION:
q.Query = strings.TrimSpace(q.Query)
if q.Query[len(q.Query)-1] == ';' {
Expand Down