提交 17a1d172 编写于 作者: G Ganlin Zhao

[TD-10700]<enhance>: fixed uppercase tag in escape quote issue

上级 10777888
...@@ -940,6 +940,7 @@ static int32_t parseTagsFromJSON(cJSON *root, TAOS_SML_KV **pKVs, int *num_kvs, ...@@ -940,6 +940,7 @@ static int32_t parseTagsFromJSON(cJSON *root, TAOS_SML_KV **pKVs, int *num_kvs,
} }
pkv->key = tcalloc(keyLen + TS_ESCAPE_CHAR_SIZE + 1, sizeof(char)); pkv->key = tcalloc(keyLen + TS_ESCAPE_CHAR_SIZE + 1, sizeof(char));
strncpy(pkv->key, tag->string, keyLen); strncpy(pkv->key, tag->string, keyLen);
strntolower_s(pkv->key, pkv->key, (int32_t)keyLen);
addEscapeCharToString(pkv->key, keyLen); addEscapeCharToString(pkv->key, keyLen);
//value //value
ret = parseValueFromJSON(tag, pkv, info); ret = parseValueFromJSON(tag, pkv, info);
......
...@@ -793,7 +793,7 @@ class TDTestCase: ...@@ -793,7 +793,7 @@ class TDTestCase:
payload = [''' payload = ['''
{ {
"metric": "123abc", "metric": "STABLE",
"timestamp": { "timestamp": {
"value": 1626006833, "value": 1626006833,
"type": "s" "type": "s"
...@@ -819,7 +819,7 @@ class TDTestCase: ...@@ -819,7 +819,7 @@ class TDTestCase:
"value": 2147483647, "value": 2147483647,
"type": "int" "type": "int"
}, },
"from": { "INSERT": {
"value": 9.2233720368547758e+18, "value": 9.2233720368547758e+18,
"type": "bigint" "type": "bigint"
}, },
...@@ -834,7 +834,7 @@ class TDTestCase: ...@@ -834,7 +834,7 @@ class TDTestCase:
code = self._conn.schemaless_insert(payload, TDSmlProtocolType.JSON.value, TDSmlTimestampType.NOT_CONFIGURED.value) code = self._conn.schemaless_insert(payload, TDSmlProtocolType.JSON.value, TDSmlTimestampType.NOT_CONFIGURED.value)
print("schemaless_insert result {}".format(code)) print("schemaless_insert result {}".format(code))
tdSql.query("describe `123abc`") tdSql.query("describe `stable`")
tdSql.checkRows(8) tdSql.checkRows(8)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册