未验证 提交 0129a04a 编写于 作者: L liuliang 提交者: GitHub

Update taosSqlCgo.go

这个dbname都没有传进行,在连接池的情况下,每个连接都在选 use db.

当连接池切换连接时,就会出现 invalid DB。
```
8/16 12:44:46 dsn.go:59: input dsn: root:taosdata@/tcp(127.0.0.1)/sensors_test
TAOS DRIVER 2019/08/16 12:44:46 dsn.go:130: cfg info: &{user:root passwd:taosdata net:/tcp addr:127.0.0.1 port:0 dbName:sensors_test params:map[] loc:0xed6be0 columnsWithAlias:false interpolateParams:true parseTime:true}
TAOS DRIVER 2019/08/16 12:44:46 taosSqlCgo.go:52: taosQuery() input sql:INSERT INTO d_BDCF682B78F44364AA551B0F5E6BD1F6_acc USING acc_data TAGS ('BDCF682B78F44364AA551B0F5E6BD1F6','20190816-
TAOS DRIVER 2019/08/16 12:44:46 taosSqlCgo.go:61: taos_query() failed: invalid DB
```
上级 542da254
......@@ -33,7 +33,7 @@ func (mc *taosConn) taosConnect(ip, user, pass, db string, port int) (taos unsaf
cuser := C.CString(user)
cpass := C.CString(pass)
cip := C.CString(ip)
cdb := C.CString("")
cdb := C.CString(db)
defer C.free(unsafe.Pointer(cip))
defer C.free(unsafe.Pointer(cuser))
defer C.free(unsafe.Pointer(cpass))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册