diff --git a/chain.go b/chain.go index 969a648..81c66d5 100644 --- a/chain.go +++ b/chain.go @@ -351,7 +351,10 @@ func (this *Query) QueryStmt() error { return err } sql := helper.ToStr(res["sql"]) - if this.conn == nil { + + if SLAVER_DB != nil { + this.conn = SLAVER_DB + } else { this.conn = DB }