From 69725b00638ebf5e177bf8d762ef55ce737d9122 Mon Sep 17 00:00:00 2001 From: guzeng Date: Wed, 2 Mar 2022 16:19:56 +0800 Subject: [PATCH] debug --- tencentdb/chain.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tencentdb/chain.go b/tencentdb/chain.go index c89ec97..1989c8a 100644 --- a/tencentdb/chain.go +++ b/tencentdb/chain.go @@ -431,6 +431,14 @@ func (this *Query) Find() (map[string]string, error) { log.Println("Err: no conn") } + var connection_id int + err = conn.Query("select CONNECTION_ID()").Scan(&connection_id) + if err != nil { + log.Println("query connection id failed:", err) + } else { + log.Println("connection id:", connection_id) + } + _, row, err := GetRow(conn, this.dbname, this.table, this.alias, this.title, this.join, this.where, this.where_or, this.value, this.orderby, this.debug)