提交 136189e3 编写于 作者: S shenglian zhou

memory handling

上级 4404919d
......@@ -6,6 +6,7 @@
#include <string.h>
#include <taos.h>
#include <unistd.h>
#include <tconfig.h>
static void prepare_data(TAOS* taos) {
TAOS_RES *result;
......@@ -965,23 +966,13 @@ int32_t verify_schema_less(TAOS* taos) {
char* lines[] = {
"st,t1=3i,t2=4,t3=\"t3\" c1=3i,c3=L\"passit\",c2=false,c4=4 1626006833639000000",
"st,t1=4i,t3=\"t4\",t2=5,t4=5 c1=3i,c3=L\"passitagain\",c2=true,c4=5 1626006833640000000",
"st,t1=4i,t3=\"t4\",t2=5,t4=5 c1=3i,c3=L\"passitagin\",c2=true,c4=5,c5=5 1626006833640000000",
"st,t1=4i,t2=5,t3=\"t4\" c1=3i,c3=L\"passitagain\",c2=true,c4=5 1626006833642000000",
"ste,t2=5,t3=L\"ste\" c1=true,c2=4,c3=\"iam\" 1626056811823316532",
"ste,t2=5,t3=L\"ste2\" c3=\"iamszhou\",c4=false 1626056811843316532"
};
// int code = taos_insert_by_lines(taos, lines , 5);
int code = taos_insert_by_lines(taos, &(lines[0]), 1);
code = taos_insert_by_lines(taos, &(lines[1]), 1);
// code = taos_insert_by_lines(taos, &(lines[2]), 1);
//
// code = taos_insert_by_lines(taos, &(lines[3]), 1);
//
// code = taos_insert_by_lines(taos, &(lines[4]), 1);
int code = taos_insert_by_lines(taos, lines , 5);
return code;
}
......@@ -992,7 +983,7 @@ int main(int argc, char *argv[]) {
const char* passwd = "taosdata";
taos_options(TSDB_OPTION_TIMEZONE, "GMT-8");
taos_options(TSDB_OPTION_CONFIGDIR, "/etc/taos");
taosDumpGlobalCfg();
TAOS* taos = taos_connect(host, user, passwd, "", 0);
if (taos == NULL) {
printf("\033[31mfailed to connect to db, reason:%s\033[0m\n", taos_errstr(taos));
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print =============== step1
$db = testlp
$mte = ste
$mt = st
sql drop database $db -x step1
step1:
sql create database $db precision 'us'
sql use $db
sql create stable $mte (ts timestamp, f int) TAGS(t1 bigint)
line_insert st,t1=3i,t2=4,t3="t3" c1=3i,c3=L"passit",c2=false,c4=4 1626006833639000000
line_insert st,t1=4i,t3="t4",t2=5 c1=3i,c3=L"passitagain",c2=true,c4=5,c5=5 1626006833640000000
line_insert st,t1=4i,t2=5,t3="t4" c1=3i,c3=L"passitagain",c2=true,c4=5 1626006833642000000
line_insert ste,t2=5,t3=L"ste" c1=true,c2=4,c3="iam" 1626056811823316532
line_insert ste,t2=5,t3=L"ste2" c3="iamszhou",c4=false 1626056811843316532
#print =============== clear
#sql drop database $db
#sql show databases
#if $rows != 0 then
# return -1
#endi
#
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册