未验证 提交 b0792743 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

feat(tools): taos shell refactor (#11416)

* [TD-13558]<feature>: taos shell refactor

add taosTools as submodule

* add tools/taos-tools

* add more client interface for taosTools compile

* update taos-tools

* update taos-tools

* refactor shell

* [TD-13558]<feature>: taos shell test speed

* [TD-13558]<feature>: taos -n startup works

* taos -n rpc works

* taos -n server works

* cleanup code since no endPort in 3.0

* update taos-tools

* [TD-13558]<feature>: taos -C works

* improve taos shell -c WIP

* update taos-tools
上级 ff70238e
......@@ -18,6 +18,7 @@
#include "tarray.h"
#include "tdef.h"
#include "tconfig.h"
#ifdef __cplusplus
extern "C" {
......@@ -129,6 +130,7 @@ void taosCfgDynamicOptions(const char *option, const char *value);
void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary);
struct SConfig *taosGetCfg();
int32_t taosAddClientLogCfg(SConfig *pCfg);
#ifdef __cplusplus
}
......
......@@ -256,7 +256,7 @@ static int32_t taosLoadCfg(SConfig *pCfg, const char *inputCfgDir, const char *e
return 0;
}
static int32_t taosAddClientLogCfg(SConfig *pCfg) {
int32_t taosAddClientLogCfg(SConfig *pCfg) {
if (cfgAddDir(pCfg, "configDir", configDir, 1) != 0) return -1;
if (cfgAddDir(pCfg, "scriptDir", configDir, 1) != 0) return -1;
if (cfgAddDir(pCfg, "logDir", tsLogDir, 1) != 0) return -1;
......
......@@ -26,6 +26,7 @@
#include "tglobal.h"
#include "ttypes.h"
#include "tutil.h"
#include "tconfig.h"
#include <regex.h>
#include <wordexp.h>
......@@ -90,6 +91,11 @@ TAOS *shellInit(SShellArguments *_args) {
_args->user = TSDB_DEFAULT_USER;
}
SConfig *pCfg = cfgInit();
if (NULL == pCfg) return NULL;
if (0 != taosAddClientLogCfg(pCfg)) return NULL;
// Connect to the database.
TAOS *con = NULL;
if (_args->auth == NULL) {
......
Subproject commit 33cdfe4f90a209f105c1b6091439798a9cde1e93
Subproject commit bf6c766986c61ff4fc80421fdea682a8fd4b5b32
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册