提交 ebfeb110 编写于 作者: C Cary Xu

Merge branch 'master' into feature/TS-832-M

...@@ -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)")
......
...@@ -30,7 +30,7 @@ class TDTestCase: ...@@ -30,7 +30,7 @@ class TDTestCase:
print("==============step1") print("==============step1")
tdSql.execute( 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("insert into d1001 using ampere tags('test', '2', '2', '2') VALUES (now, 123)")
tdSql.execute("ALTER TABLE ampere ADD TAG variable_id BINARY(50)") 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.
先完成此消息的编辑!
想要评论请 注册