未验证 提交 28e909d3 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #11037 from taosdata/fix/TD-14342-2.4

Fix/td 14342 2.4
...@@ -3608,16 +3608,11 @@ int32_t filterConverNcharColumns(SFilterInfo* info, int32_t rows, bool *gotNchar ...@@ -3608,16 +3608,11 @@ int32_t filterConverNcharColumns(SFilterInfo* info, int32_t rows, bool *gotNchar
for (int32_t j = 0; j < rows; ++j) { for (int32_t j = 0; j < rows; ++j) {
char *src = FILTER_GET_COL_FIELD_DATA(fi, j); char *src = FILTER_GET_COL_FIELD_DATA(fi, j);
char *dst = FILTER_GET_COL_FIELD_DATA(&nfi, j); char *dst = FILTER_GET_COL_FIELD_DATA(&nfi, j);
int32_t len = 0; if(isNull(src, TSDB_DATA_TYPE_NCHAR)){
char *varSrc = varDataVal(src);
size_t k = 0, varSrcLen = varDataLen(src);
while (k < varSrcLen && varSrc[k++] == -1) {}
if (k == varSrcLen) {
/* NULL */
varDataLen(dst) = (VarDataLenT) varSrcLen;
varDataCopy(dst, src); varDataCopy(dst, src);
continue; continue;
} }
int32_t len = 0;
bool ret = taosMbsToUcs4(varDataVal(src), varDataLen(src), varDataVal(dst), bufSize, &len); bool ret = taosMbsToUcs4(varDataVal(src), varDataLen(src), varDataVal(dst), bufSize, &len);
if(!ret) { if(!ret) {
qError("filterConverNcharColumns taosMbsToUcs4 error"); qError("filterConverNcharColumns taosMbsToUcs4 error");
......
...@@ -619,9 +619,11 @@ class TDTestCase: ...@@ -619,9 +619,11 @@ class TDTestCase:
sql += "%s )" % random.choice(t_join_where) sql += "%s )" % random.choice(t_join_where)
datacheck = self.stable_join_checkall_0(sql) datacheck = self.stable_join_checkall_0(sql)
tdSql.checkRows(100) tdSql.checkRows(100)
datacheck = self.stable_join_checkall_100(sql) datacheck = self.stable_join_checkall_100(sql)
# for TD-14342
sql = "select * from ( select * from stable_1 ) where t_nchar like 'nchar%' or t_nchar = '0'"
datacheck = self.stable1_checkall_0(sql)
endTime = time.time() endTime = time.time()
print("total time %ds" % (endTime - startTime)) print("total time %ds" % (endTime - startTime))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册