Track tRowBuild-allocated rows explicitly in stmtPatch (aHeapRows) and free
them before tDestroySubmitReq instead of inferring heap vs slab by address
range, fixing invalid free of decoded-in-place SRow pointers.
Use asyncQueryCb for internal async retries so the user asyncExecFn runs once
with the final result; invoke the user callback when retry setup fails; remove
asyncQueryCbRetry.
In stmt2Case.exec_retry, accept NULL for backfilled INT columns after ALTER
ADD COLUMN (taos_fetch_row uses null pointers for SQL NULL).
* fix: decimal string conversion missing in tRowBuildFromBind2WithBlob
Root cause: tRowBuildFromBind2WithBlob lacked the DECIMAL/DECIMAL64
string-to-binary conversion that exists in tRowBuildFromBind2. When a
table contains both DECIMAL and BLOB columns, the blob code path is
taken (tRowBuildFromBind2WithBlob), which treated DECIMAL as a raw
fixed-size binary type and read 16 bytes directly from the user buffer.
Since the user provides decimal values as text strings (e.g. "21.4300"),
the 15-byte buffer was too small, causing a stack-buffer-overflow.
Fix: Add pSchemaExt parameter to tRowBuildFromBind2WithBlob and add
DECIMAL/DECIMAL64 string-to-binary conversion (decimal128FromStr /
decimal64FromStr) in the fixed-size else branch, mirroring the logic
in tRowBuildFromBind2. Update the call site in parInsertStmt.c to pass
pSchemaExt.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(stmt2): correct DECIMAL in KV+blob row build and align bind path with parsed columns
- tRowBuildKVRowWithBlob / tRowBuildKVRowWithBlob2: copy fixed columns via
VALUE_GET_DATUM() so DECIMAL uses pData instead of the trivial val field.
- tRowBuildFromBind2WithBlob: mirror tRowBuildFromBind2 — accept parsedCols,
correct bufArray indexing with numOfFixedValue, TAOS_CHECK_GOTO/lino, and
free decimal128 heap after each successful row (and on error) to plug leaks.
- parInsertStmt: pass parsedCols into tRowBuildFromBind2WithBlob.
- Add stmt2Case.stmt2_decimal_blob_interleaved in stmt2Test
* fix review
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>