[TBASE-1047] Go connector prints all the SQL. This will harm the performance and consume unnecessary hard disk space. Modified to print only the SQLs which returns error.
This commit is contained in:
parent
fcc308fb40
commit
db26cf1e8e
|
@ -48,7 +48,7 @@ func (mc *taosConn) taosConnect(ip, user, pass, db string, port int) (taos unsaf
|
|||
}
|
||||
|
||||
func (mc *taosConn) taosQuery(sqlstr string) (int, error) {
|
||||
taosLog.Printf("taosQuery() input sql:%s\n", sqlstr)
|
||||
//taosLog.Printf("taosQuery() input sql:%s\n", sqlstr)
|
||||
|
||||
csqlstr := C.CString(sqlstr)
|
||||
defer C.free(unsafe.Pointer(csqlstr))
|
||||
|
@ -58,6 +58,7 @@ func (mc *taosConn) taosQuery(sqlstr string) (int, error) {
|
|||
mc.taos_error()
|
||||
errStr := C.GoString(C.taos_errstr(mc.taos))
|
||||
taosLog.Println("taos_query() failed:", errStr)
|
||||
taosLog.Printf("taosQuery() input sql:%s\n", sqlstr)
|
||||
return 0, errors.New(errStr)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue