未验证 提交 c7d3cac7 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #8854 from taosdata/hotfix/TD-11584

[TD-11584]invalid sql can be executed successfully
......@@ -744,6 +744,10 @@ void tSetColumnType(TAOS_FIELD *pField, SStrToken *type) {
pField->bytes = (int16_t)bytes;
}
} else {
if (type->type > 0) {
pField->type = -1;
}
}
}
......
......@@ -28,6 +28,8 @@ class TDTestCase:
print("==============step1")
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.tb using st tags(1)")
tdSql.execute("insert into db.tb values(now, 1)")
......
......@@ -30,7 +30,7 @@ class TDTestCase:
print("==============step1")
tdSql.execute(
"CREATE TABLE IF NOT EXISTS ampere (ts TIMESTAMP(8),ampere DOUBLE(8)) TAGS (device_name BINARY(50),build_id BINARY(50),project_id BINARY(50),alias BINARY(50))")
"CREATE TABLE IF NOT EXISTS ampere (ts TIMESTAMP,ampere DOUBLE) TAGS (device_name BINARY(50),build_id BINARY(50),project_id BINARY(50),alias BINARY(50))")
tdSql.execute("insert into d1001 using ampere tags('test', '2', '2', '2') VALUES (now, 123)")
tdSql.execute("ALTER TABLE ampere ADD TAG variable_id BINARY(50)")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册