From ff798de0a642658fead6258d89a376a9cc654034 Mon Sep 17 00:00:00 2001 From: guzeng Date: Wed, 19 Oct 2022 10:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0=E4=B8=BB?= =?UTF-8?q?=E4=BB=8E=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chain.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }