[td-225] fix bugs in dynamic set tags values during on demand create table
This commit is contained in:
parent
7baed33533
commit
9d492a8d93
|
@ -925,8 +925,12 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) {
|
||||||
|
|
||||||
for (int32_t i = 0; i < spd.numOfCols; ++i) {
|
for (int32_t i = 0; i < spd.numOfCols; ++i) {
|
||||||
if (!spd.hasVal[i]) { // current tag column do not have any value to insert, set it to null
|
if (!spd.hasVal[i]) { // current tag column do not have any value to insert, set it to null
|
||||||
|
if (pTagSchema[i].type == TSDB_DATA_TYPE_BINARY || pTagSchema[i].type == TSDB_DATA_TYPE_NCHAR) {
|
||||||
|
setVardataNull(ptr, pTagSchema[i].type);
|
||||||
|
} else {
|
||||||
setNull(ptr, pTagSchema[i].type, pTagSchema[i].bytes);
|
setNull(ptr, pTagSchema[i].type, pTagSchema[i].bytes);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ptr += pTagSchema[i].bytes;
|
ptr += pTagSchema[i].bytes;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue