fix: fix stmt rerun issue
This commit is contained in:
parent
c8e1e2a09e
commit
e69f59ba77
|
@ -20,6 +20,7 @@
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "tname.h"
|
#include "tname.h"
|
||||||
#include "ttypes.h"
|
#include "ttypes.h"
|
||||||
|
#include "query.h"
|
||||||
|
|
||||||
#define IS_DATA_COL_ORDERED(spd) ((spd->orderStatus) == (int8_t)ORDER_STATUS_ORDERED)
|
#define IS_DATA_COL_ORDERED(spd) ((spd->orderStatus) == (int8_t)ORDER_STATUS_ORDERED)
|
||||||
|
|
||||||
|
|
|
@ -630,6 +630,17 @@ int32_t qCloneStmtDataBlock(void** pDst, void* pSrc) {
|
||||||
memcpy(*pDst, pSrc, sizeof(STableDataBlocks));
|
memcpy(*pDst, pSrc, sizeof(STableDataBlocks));
|
||||||
((STableDataBlocks*)(*pDst))->cloned = true;
|
((STableDataBlocks*)(*pDst))->cloned = true;
|
||||||
|
|
||||||
|
STableDataBlocks* pBlock = (STableDataBlocks*)(*pDst);
|
||||||
|
if (pBlock->pTableMeta) {
|
||||||
|
void *pNewMeta = taosMemoryMalloc(TABLE_META_SIZE(pBlock->pTableMeta));
|
||||||
|
if (NULL == pNewMeta) {
|
||||||
|
taosMemoryFreeClear(*pDst);
|
||||||
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
memcpy(pNewMeta, pBlock->pTableMeta, TABLE_META_SIZE(pBlock->pTableMeta));
|
||||||
|
pBlock->pTableMeta = pNewMeta;
|
||||||
|
}
|
||||||
|
|
||||||
return qResetStmtDataBlock(*pDst, false);
|
return qResetStmtDataBlock(*pDst, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue