fix database not found bug
This commit is contained in:
parent
c6ad69ae5d
commit
c181cffe1e
|
@ -848,6 +848,7 @@ static int stmtSetDbName2(TAOS_STMT2* stmt, const char* dbName) {
|
||||||
STMT_DLOG("start to set dbName: %s", dbName);
|
STMT_DLOG("start to set dbName: %s", dbName);
|
||||||
|
|
||||||
pStmt->db = taosStrdup(dbName);
|
pStmt->db = taosStrdup(dbName);
|
||||||
|
(void)strdequote(pStmt->db);
|
||||||
STMT_ERR_RET(stmtCreateRequest(pStmt));
|
STMT_ERR_RET(stmtCreateRequest(pStmt));
|
||||||
|
|
||||||
// The SQL statement specifies a database name, overriding the previously specified database
|
// The SQL statement specifies a database name, overriding the previously specified database
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "taos.h"
|
#include "taos.h"
|
||||||
|
|
||||||
int CTB_NUMS = 2;
|
int CTB_NUMS = 1;
|
||||||
int ROW_NUMS = 2;
|
int ROW_NUMS = 1;
|
||||||
int CYC_NUMS = 2;
|
int CYC_NUMS = 2;
|
||||||
|
|
||||||
void do_query(TAOS* taos, const char* sql) {
|
void do_query(TAOS* taos, const char* sql) {
|
||||||
|
@ -217,7 +217,7 @@ int main() {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
do_stmt(taos, "insert into db.stb(tbname,ts,b,t1,t2) values(?,?,?,?,?)");
|
do_stmt(taos, "insert into `db`.`stb` (tbname,ts,b,t1,t2) values(?,?,?,?,?)");
|
||||||
// do_stmt(taos, "insert into db.? using db.stb tags(?,?)values(?,?)");
|
// do_stmt(taos, "insert into db.? using db.stb tags(?,?)values(?,?)");
|
||||||
// do_taosc(taos);
|
// do_taosc(taos);
|
||||||
taos_close(taos);
|
taos_close(taos);
|
||||||
|
|
Loading…
Reference in New Issue