提交 873ab6d9 编写于 作者: D dapan1121

[TD-11584]invalid sql can be executed successfully

上级 eea679a7
...@@ -744,6 +744,10 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) { ...@@ -744,6 +744,10 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
pField->bytes = (int16_t)bytes; pField->bytes = (int16_t)bytes;
} }
} else {
if (type->type > 0) {
pField->type = -1;
}
} }
} }
......
...@@ -28,6 +28,8 @@ class TDTestCase: ...@@ -28,6 +28,8 @@ class TDTestCase:
print("==============step1") print("==============step1")
print("prepare data") print("prepare data")
tdSql.error("create table db.st1 (ts timestamp(8), i int) tags(j int)")
tdSql.error("create table db.st2 (ts timestamp, i int(2)) tags(j int)")
tdSql.execute("create table db.st (ts timestamp, i int) tags(j int)") tdSql.execute("create table db.st (ts timestamp, i int) tags(j int)")
tdSql.execute("create table db.tb using st tags(1)") tdSql.execute("create table db.tb using st tags(1)")
tdSql.execute("insert into db.tb values(now, 1)") tdSql.execute("insert into db.tb values(now, 1)")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册