[td-4446]<fix>: fix repeat import caused crash.
This commit is contained in:
parent
ea0b5b9bb9
commit
c284d848da
|
@ -3320,7 +3320,11 @@ void doExecuteQuery(SSqlObj* pSql, SQueryInfo* pQueryInfo) {
|
||||||
tscHandleMasterSTableQuery(pSql);
|
tscHandleMasterSTableQuery(pSql);
|
||||||
tscUnlockByThread(&pSql->squeryLock);
|
tscUnlockByThread(&pSql->squeryLock);
|
||||||
} else if (TSDB_QUERY_HAS_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_INSERT)) {
|
} else if (TSDB_QUERY_HAS_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_INSERT)) {
|
||||||
tscHandleMultivnodeInsert(pSql);
|
if (TSDB_QUERY_HAS_TYPE(pSql->cmd.insertParam.insertType, TSDB_QUERY_TYPE_FILE_INSERT)) {
|
||||||
|
tscImportDataFromFile(pSql);
|
||||||
|
} else {
|
||||||
|
tscHandleMultivnodeInsert(pSql);
|
||||||
|
}
|
||||||
} else if (pSql->cmd.command > TSDB_SQL_LOCAL) {
|
} else if (pSql->cmd.command > TSDB_SQL_LOCAL) {
|
||||||
tscProcessLocalCmd(pSql);
|
tscProcessLocalCmd(pSql);
|
||||||
} else { // send request to server directly
|
} else { // send request to server directly
|
||||||
|
|
|
@ -18,6 +18,7 @@ system general/parser/gendata.sh
|
||||||
sql create table tbx (ts TIMESTAMP, collect_area NCHAR(12), device_id BINARY(16), imsi BINARY(16), imei BINARY(16), mdn BINARY(10), net_type BINARY(4), mno NCHAR(4), province NCHAR(10), city NCHAR(16), alarm BINARY(2))
|
sql create table tbx (ts TIMESTAMP, collect_area NCHAR(12), device_id BINARY(16), imsi BINARY(16), imei BINARY(16), mdn BINARY(10), net_type BINARY(4), mno NCHAR(4), province NCHAR(10), city NCHAR(16), alarm BINARY(2))
|
||||||
print ====== create tables success, starting import data
|
print ====== create tables success, starting import data
|
||||||
|
|
||||||
|
sql import into tbx file '~/data.sql'
|
||||||
sql import into tbx file '~/data.sql'
|
sql import into tbx file '~/data.sql'
|
||||||
|
|
||||||
sql select count(*) from tbx
|
sql select count(*) from tbx
|
||||||
|
|
Loading…
Reference in New Issue