chore: fix taos_data_type/errno/errstr() error before taos_init() call (#30414)
This commit is contained in:
parent
d800d0ef25
commit
e73d98456d
|
@ -170,6 +170,7 @@ void taos_close(TAOS *taos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *taos_data_type(int type) {
|
const char *taos_data_type(int type) {
|
||||||
|
(void)taos_init();
|
||||||
CHECK_PTR(fp_taos_data_type);
|
CHECK_PTR(fp_taos_data_type);
|
||||||
return (*fp_taos_data_type)(type);
|
return (*fp_taos_data_type)(type);
|
||||||
}
|
}
|
||||||
|
@ -504,6 +505,7 @@ int taos_get_current_db(TAOS *taos, char *database, int len, int *required) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *taos_errstr(TAOS_RES *res) {
|
const char *taos_errstr(TAOS_RES *res) {
|
||||||
|
(void)taos_init();
|
||||||
if (fp_taos_errstr == NULL) {
|
if (fp_taos_errstr == NULL) {
|
||||||
return tstrerror(terrno);
|
return tstrerror(terrno);
|
||||||
}
|
}
|
||||||
|
@ -511,6 +513,7 @@ const char *taos_errstr(TAOS_RES *res) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int taos_errno(TAOS_RES *res) {
|
int taos_errno(TAOS_RES *res) {
|
||||||
|
(void)taos_init();
|
||||||
if (fp_taos_errno == NULL) {
|
if (fp_taos_errno == NULL) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
@ -649,7 +652,7 @@ TAOS_RES *taos_schemaless_insert_ttl_with_reqid_tbname_key(TAOS *taos, char *lin
|
||||||
}
|
}
|
||||||
|
|
||||||
tmq_conf_t *tmq_conf_new() {
|
tmq_conf_t *tmq_conf_new() {
|
||||||
taos_init();
|
(void)taos_init();
|
||||||
CHECK_PTR(fp_tmq_conf_new);
|
CHECK_PTR(fp_tmq_conf_new);
|
||||||
return (*fp_tmq_conf_new)();
|
return (*fp_tmq_conf_new)();
|
||||||
}
|
}
|
||||||
|
@ -670,7 +673,7 @@ void tmq_conf_set_auto_commit_cb(tmq_conf_t *conf, tmq_commit_cb *cb, void *para
|
||||||
}
|
}
|
||||||
|
|
||||||
tmq_list_t *tmq_list_new() {
|
tmq_list_t *tmq_list_new() {
|
||||||
taos_init();
|
(void)taos_init();
|
||||||
CHECK_PTR(fp_tmq_list_new);
|
CHECK_PTR(fp_tmq_list_new);
|
||||||
return (*fp_tmq_list_new)();
|
return (*fp_tmq_list_new)();
|
||||||
}
|
}
|
||||||
|
@ -696,7 +699,7 @@ char **tmq_list_to_c_array(const tmq_list_t *tlist) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tmq_t *tmq_consumer_new(tmq_conf_t *conf, char *errstr, int32_t errstrLen) {
|
tmq_t *tmq_consumer_new(tmq_conf_t *conf, char *errstr, int32_t errstrLen) {
|
||||||
taos_init();
|
(void)taos_init();
|
||||||
CHECK_PTR(fp_tmq_consumer_new);
|
CHECK_PTR(fp_tmq_consumer_new);
|
||||||
return (*fp_tmq_consumer_new)(conf, errstr, errstrLen);
|
return (*fp_tmq_consumer_new)(conf, errstr, errstrLen);
|
||||||
}
|
}
|
||||||
|
@ -866,13 +869,13 @@ TSDB_SERVER_STATUS taos_check_server_status(const char *fqdn, int port, char *de
|
||||||
}
|
}
|
||||||
|
|
||||||
void taos_write_crashinfo(int signum, void *sigInfo, void *context) {
|
void taos_write_crashinfo(int signum, void *sigInfo, void *context) {
|
||||||
taos_init();
|
(void)taos_init();
|
||||||
CHECK_VOID(fp_taos_write_crashinfo);
|
CHECK_VOID(fp_taos_write_crashinfo);
|
||||||
(*fp_taos_write_crashinfo)(signum, sigInfo, context);
|
(*fp_taos_write_crashinfo)(signum, sigInfo, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *getBuildInfo() {
|
char *getBuildInfo() {
|
||||||
taos_init();
|
(void)taos_init();
|
||||||
CHECK_PTR(fp_getBuildInfo);
|
CHECK_PTR(fp_getBuildInfo);
|
||||||
return (*fp_getBuildInfo)();
|
return (*fp_getBuildInfo)();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue