Merge pull request #11849 from taosdata/feature/check

fix: write histroy in shell
This commit is contained in:
Shengliang Guan 2022-04-25 20:55:12 +08:00 committed by GitHub
commit 93bf4fefc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -750,7 +750,7 @@ void shellReadHistory() {
void shellWriteHistory() {
SShellHistory *pHistory = &shell.history;
TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_WRITE | TD_FILE_STREAM);
TdFilePtr pFile = taosOpenFile(pHistory->file, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_STREAM | TD_FILE_APPEND);
if (pFile == NULL) return;
for (int32_t i = pHistory->hstart; i != pHistory->hend;) {