From 646d807a28acd2549c0b6fd731d05e3be7f30e93 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 4 Dec 2023 22:43:04 +0800 Subject: [PATCH] test: check null tag when insert by stb --- tests/script/tsim/insert/insert_stb.sim | 23 ++++++++++++++++++++ tests/script/tsim/parser/columnValue_int.sim | 12 ---------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/tests/script/tsim/insert/insert_stb.sim b/tests/script/tsim/insert/insert_stb.sim index 4c0797e2a7..14ff2261c2 100644 --- a/tests/script/tsim/insert/insert_stb.sim +++ b/tests/script/tsim/insert/insert_stb.sim @@ -66,6 +66,29 @@ if $rows != 1 then return -1 endi +sql insert into st(tbname, ts, f, t) values('ct2',now,20,NULL)('ct3',now,30,NULL) +sql insert into st(tbname, t, ts, f) values('ct4',NULL, now,20)('ct5',NULL, now,30) +sql show create table ct2 +sql show create table ct3 +sql show create table ct4 +sql show create table ct5 +sql show tags from ct2 +if $data05 != NULL then + return -1 +endi +sql show tags from ct3 +if $data05 != NULL then + return -1 +endi +sql show tags from ct4 +if $data05 != NULL then + return -1 +endi +sql show tags from ct5 +if $data05 != NULL then + return -1 +endi + sql_error insert into d2.st values(now, 1, 1) sql_error insert into d2.st(ts, f) values(now, 1); sql_error insert into d2.st(ts, f, tbname) values(now, 1); diff --git a/tests/script/tsim/parser/columnValue_int.sim b/tests/script/tsim/parser/columnValue_int.sim index 9f0fb6e294..e68ae6f13f 100644 --- a/tests/script/tsim/parser/columnValue_int.sim +++ b/tests/script/tsim/parser/columnValue_int.sim @@ -28,18 +28,6 @@ if $data05 != NULL then return -1 endi -sql insert into mt_int(tbname,tagname,ts,c) values("st_int_00",NULL,now,1) values("st_int_01", NULL, now,2) -sql show create table st_int_00 -sql show create table st_int_01 -sql show tags from st_int_00 -if $data05 != NULL then - return -1 -endi -sql show tags from st_int_01 -if $data05 != NULL then - return -1 -endi - sql_error create table st_int_2 using mt_int tags ('NULL') sql_error create table st_int_3 using mt_int tags ('NULL') sql_error create table st_int_4 using mt_int tags ("NULL")