fix: interlace=0 with fixed tags memory bad access (#30392)
This commit is contained in:
parent
0000a2edca
commit
30402f66a6
|
@ -2239,7 +2239,7 @@ int taos_stmt2_bind_param(TAOS_STMT2 *stmt, TAOS_STMT2_BINDV *bindv, int32_t col
|
||||||
SVCreateTbReq *pCreateTbReq = NULL;
|
SVCreateTbReq *pCreateTbReq = NULL;
|
||||||
if (bindv->tags && bindv->tags[i]) {
|
if (bindv->tags && bindv->tags[i]) {
|
||||||
code = stmtSetTbTags2(stmt, bindv->tags[i], &pCreateTbReq);
|
code = stmtSetTbTags2(stmt, bindv->tags[i], &pCreateTbReq);
|
||||||
} else if (pStmt->sql.autoCreateTbl || pStmt->bInfo.needParse) {
|
} else if (pStmt->bInfo.tbNameFlag & IS_FIXED_TAG) {
|
||||||
code = stmtCheckTags2(stmt, &pCreateTbReq);
|
code = stmtCheckTags2(stmt, &pCreateTbReq);
|
||||||
} else {
|
} else {
|
||||||
pStmt->sql.autoCreateTbl = false;
|
pStmt->sql.autoCreateTbl = false;
|
||||||
|
|
|
@ -958,6 +958,11 @@ TEST(stmt2Case, stmt2_stb_insert) {
|
||||||
"insert into stmt2_testdb_1.? using stmt2_testdb_1.stb (t1,t2)tags(?,?) (ts,b)values(?,?)", 3, 3, 3, true,
|
"insert into stmt2_testdb_1.? using stmt2_testdb_1.stb (t1,t2)tags(?,?) (ts,b)values(?,?)", 3, 3, 3, true,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
// TD-34123 : interlace=0 with fixed tags
|
||||||
|
{
|
||||||
|
do_stmt("no-interlcace", taos, &option, "insert into `stmt2_testdb_1`.`stb` (tbname,ts,b,t1,t2) values(?,?,?,?,?)",
|
||||||
|
3, 3, 3, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
// interlace = 0 & use db]
|
// interlace = 0 & use db]
|
||||||
do_query(taos, "use stmt2_testdb_1");
|
do_query(taos, "use stmt2_testdb_1");
|
||||||
|
|
Loading…
Reference in New Issue