Merge pull request #696 from taosdata/feature/tliu

[TBASE-1047]
This commit is contained in:
plum-lihui 2019-11-11 13:24:32 +08:00 committed by GitHub
commit b68d5e88c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 28 deletions

View File

@ -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)
}