Merge branch 'develop' into feature/szhou/schemaless
This commit is contained in:
commit
597c14e7c4
|
@ -4,9 +4,6 @@ properties([pipelineTriggers([githubPush()])])
|
||||||
node {
|
node {
|
||||||
git url: 'https://github.com/taosdata/TDengine.git'
|
git url: 'https://github.com/taosdata/TDengine.git'
|
||||||
}
|
}
|
||||||
|
|
||||||
def skipstage=0
|
|
||||||
|
|
||||||
def abortPreviousBuilds() {
|
def abortPreviousBuilds() {
|
||||||
def currentJobName = env.JOB_NAME
|
def currentJobName = env.JOB_NAME
|
||||||
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
|
def currentBuildNumber = env.BUILD_NUMBER.toInteger()
|
||||||
|
@ -33,8 +30,7 @@ def abort_previous(){
|
||||||
milestone(buildNumber)
|
milestone(buildNumber)
|
||||||
}
|
}
|
||||||
def pre_test(){
|
def pre_test(){
|
||||||
|
sh'hostname'
|
||||||
|
|
||||||
sh '''
|
sh '''
|
||||||
sudo rmtaos || echo "taosd has not installed"
|
sudo rmtaos || echo "taosd has not installed"
|
||||||
'''
|
'''
|
||||||
|
@ -52,12 +48,18 @@ def pre_test(){
|
||||||
git checkout master
|
git checkout master
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
else {
|
else if(env.CHANGE_TARGET == '2.0'){
|
||||||
|
sh '''
|
||||||
|
cd ${WKC}
|
||||||
|
git checkout 2.0
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
else{
|
||||||
sh '''
|
sh '''
|
||||||
cd ${WKC}
|
cd ${WKC}
|
||||||
git checkout develop
|
git checkout develop
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh'''
|
sh'''
|
||||||
cd ${WKC}
|
cd ${WKC}
|
||||||
|
@ -75,7 +77,13 @@ def pre_test(){
|
||||||
git checkout master
|
git checkout master
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
else {
|
else if(env.CHANGE_TARGET == '2.0'){
|
||||||
|
sh '''
|
||||||
|
cd ${WK}
|
||||||
|
git checkout 2.0
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
else{
|
||||||
sh '''
|
sh '''
|
||||||
cd ${WK}
|
cd ${WK}
|
||||||
git checkout develop
|
git checkout develop
|
||||||
|
@ -95,19 +103,17 @@ def pre_test(){
|
||||||
make > /dev/null
|
make > /dev/null
|
||||||
make install > /dev/null
|
make install > /dev/null
|
||||||
cd ${WKC}/tests
|
cd ${WKC}/tests
|
||||||
pip3 install ${WKC}/src/connector/python
|
pip3 install ${WKC}/src/connector/python/
|
||||||
'''
|
'''
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
|
|
||||||
environment{
|
environment{
|
||||||
WK = '/var/lib/jenkins/workspace/TDinternal'
|
WK = '/var/lib/jenkins/workspace/TDinternal'
|
||||||
WKC= '/var/lib/jenkins/workspace/TDinternal/community'
|
WKC= '/var/lib/jenkins/workspace/TDinternal/community'
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('pre_build'){
|
stage('pre_build'){
|
||||||
agent{label 'master'}
|
agent{label 'master'}
|
||||||
|
@ -123,19 +129,22 @@ pipeline {
|
||||||
rm -rf ${WORKSPACE}.tes
|
rm -rf ${WORKSPACE}.tes
|
||||||
cp -r ${WORKSPACE} ${WORKSPACE}.tes
|
cp -r ${WORKSPACE} ${WORKSPACE}.tes
|
||||||
cd ${WORKSPACE}.tes
|
cd ${WORKSPACE}.tes
|
||||||
|
git fetch
|
||||||
'''
|
'''
|
||||||
script {
|
script {
|
||||||
if (env.CHANGE_TARGET == 'master') {
|
if (env.CHANGE_TARGET == 'master') {
|
||||||
sh '''
|
sh '''
|
||||||
git checkout master
|
git checkout master
|
||||||
git pull origin master
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
else {
|
else if(env.CHANGE_TARGET == '2.0'){
|
||||||
|
sh '''
|
||||||
|
git checkout 2.0
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
else{
|
||||||
sh '''
|
sh '''
|
||||||
git checkout develop
|
git checkout develop
|
||||||
git pull origin develop
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,28 +152,29 @@ pipeline {
|
||||||
git fetch origin +refs/pull/${CHANGE_ID}/merge
|
git fetch origin +refs/pull/${CHANGE_ID}/merge
|
||||||
git checkout -qf FETCH_HEAD
|
git checkout -qf FETCH_HEAD
|
||||||
'''
|
'''
|
||||||
|
script{
|
||||||
script{
|
skipbuild='2'
|
||||||
env.skipstage=sh(script:"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 ",returnStdout:true)
|
skipbuild=sh(script: "git log -2 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]' && echo 1 || echo 2", returnStdout:true)
|
||||||
|
println skipbuild
|
||||||
}
|
}
|
||||||
println env.skipstage
|
|
||||||
sh'''
|
sh'''
|
||||||
rm -rf ${WORKSPACE}.tes
|
rm -rf ${WORKSPACE}.tes
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Parallel test stage') {
|
stage('Parallel test stage') {
|
||||||
//only build pr
|
//only build pr
|
||||||
when {
|
when {
|
||||||
|
allOf{
|
||||||
changeRequest()
|
changeRequest()
|
||||||
expression {
|
expression{
|
||||||
env.skipstage != 0
|
return skipbuild.trim() == '2'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
parallel {
|
parallel {
|
||||||
stage('python_1_s1') {
|
stage('python_1_s1') {
|
||||||
agent{label 'p1'}
|
agent{label " slave1 || slave11 "}
|
||||||
steps {
|
steps {
|
||||||
|
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -179,7 +189,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('python_2_s5') {
|
stage('python_2_s5') {
|
||||||
agent{label 'p2'}
|
agent{label " slave5 || slave15 "}
|
||||||
steps {
|
steps {
|
||||||
|
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -193,7 +203,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('python_3_s6') {
|
stage('python_3_s6') {
|
||||||
agent{label 'p3'}
|
agent{label " slave6 || slave16 "}
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -206,7 +216,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test_b1_s2') {
|
stage('test_b1_s2') {
|
||||||
agent{label 'b1'}
|
agent{label " slave2 || slave12 "}
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -217,9 +227,8 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('test_crash_gen_s3') {
|
stage('test_crash_gen_s3') {
|
||||||
agent{label "b2"}
|
agent{label " slave3 || slave13 "}
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -252,13 +261,11 @@ pipeline {
|
||||||
./test-all.sh b2fq
|
./test-all.sh b2fq
|
||||||
date
|
date
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('test_valgrind_s4') {
|
stage('test_valgrind_s4') {
|
||||||
agent{label "b3"}
|
agent{label " slave4 || slave14 "}
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -284,7 +291,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test_b4_s7') {
|
stage('test_b4_s7') {
|
||||||
agent{label 'b4'}
|
agent{label " slave7 || slave17 "}
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -303,7 +310,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test_b5_s8') {
|
stage('test_b5_s8') {
|
||||||
agent{label 'b5'}
|
agent{label " slave8 || slave18 "}
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -316,7 +323,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test_b6_s9') {
|
stage('test_b6_s9') {
|
||||||
agent{label 'b6'}
|
agent{label " slave9 || slave19 "}
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -329,7 +336,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test_b7_s10') {
|
stage('test_b7_s10') {
|
||||||
agent{label 'b7'}
|
agent{label " slave10 || slave20 "}
|
||||||
steps {
|
steps {
|
||||||
timeout(time: 55, unit: 'MINUTES'){
|
timeout(time: 55, unit: 'MINUTES'){
|
||||||
pre_test()
|
pre_test()
|
||||||
|
@ -421,6 +428,5 @@ pipeline {
|
||||||
from: "support@taosdata.com"
|
from: "support@taosdata.com"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
|
@ -991,7 +991,7 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT | TSDB_CFG_CTYPE_B_SHOW;
|
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT | TSDB_CFG_CTYPE_B_SHOW;
|
||||||
cfg.minValue = 0;
|
cfg.minValue = 0;
|
||||||
cfg.maxValue = TSDB_MAX_ALLOWED_SQL_LEN;
|
cfg.maxValue = TSDB_MAX_FIELD_LEN;
|
||||||
cfg.ptrLength = 0;
|
cfg.ptrLength = 0;
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_BYTE;
|
cfg.unitType = TAOS_CFG_UTYPE_BYTE;
|
||||||
taosInitConfigOption(cfg);
|
taosInitConfigOption(cfg);
|
||||||
|
|
|
@ -245,7 +245,6 @@ typedef struct SArguments_S {
|
||||||
uint32_t disorderRatio; // 0: no disorder, >0: x%
|
uint32_t disorderRatio; // 0: no disorder, >0: x%
|
||||||
int disorderRange; // ms, us or ns. accordig to database precision
|
int disorderRange; // ms, us or ns. accordig to database precision
|
||||||
uint32_t method_of_delete;
|
uint32_t method_of_delete;
|
||||||
char ** arg_list;
|
|
||||||
uint64_t totalInsertRows;
|
uint64_t totalInsertRows;
|
||||||
uint64_t totalAffectedRows;
|
uint64_t totalAffectedRows;
|
||||||
bool demo_mode; // use default column name and semi-random data
|
bool demo_mode; // use default column name and semi-random data
|
||||||
|
@ -637,7 +636,6 @@ SArguments g_args = {
|
||||||
0, // disorderRatio
|
0, // disorderRatio
|
||||||
1000, // disorderRange
|
1000, // disorderRange
|
||||||
1, // method_of_delete
|
1, // method_of_delete
|
||||||
NULL, // arg_list
|
|
||||||
0, // totalInsertRows;
|
0, // totalInsertRows;
|
||||||
0, // totalAffectedRows;
|
0, // totalAffectedRows;
|
||||||
true, // demo_mode;
|
true, // demo_mode;
|
||||||
|
@ -6407,6 +6405,9 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
|
||||||
bool flagSleep = true;
|
bool flagSleep = true;
|
||||||
uint64_t sleepTimeTotal = 0;
|
uint64_t sleepTimeTotal = 0;
|
||||||
|
|
||||||
|
int percentComplete = 0;
|
||||||
|
int64_t totalRows = insertRows * pThreadInfo->ntables;
|
||||||
|
|
||||||
while(pThreadInfo->totalInsertRows < pThreadInfo->ntables * insertRows) {
|
while(pThreadInfo->totalInsertRows < pThreadInfo->ntables * insertRows) {
|
||||||
if ((flagSleep) && (insert_interval)) {
|
if ((flagSleep) && (insert_interval)) {
|
||||||
st = taosGetTimestampMs();
|
st = taosGetTimestampMs();
|
||||||
|
@ -6583,6 +6584,11 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
|
||||||
|
|
||||||
pThreadInfo->totalAffectedRows += affectedRows;
|
pThreadInfo->totalAffectedRows += affectedRows;
|
||||||
|
|
||||||
|
int currentPercent = pThreadInfo->totalAffectedRows * 100 / totalRows;
|
||||||
|
if (currentPercent > percentComplete ) {
|
||||||
|
printf("[%d]:%d%%\n", pThreadInfo->threadID, currentPercent);
|
||||||
|
percentComplete = currentPercent;
|
||||||
|
}
|
||||||
int64_t currentPrintTime = taosGetTimestampMs();
|
int64_t currentPrintTime = taosGetTimestampMs();
|
||||||
if (currentPrintTime - lastPrintTime > 30*1000) {
|
if (currentPrintTime - lastPrintTime > 30*1000) {
|
||||||
printf("thread[%d] has currently inserted rows: %"PRIu64 ", affected rows: %"PRIu64 "\n",
|
printf("thread[%d] has currently inserted rows: %"PRIu64 ", affected rows: %"PRIu64 "\n",
|
||||||
|
@ -6604,6 +6610,8 @@ static void* syncWriteInterlace(threadInfo *pThreadInfo) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (percentComplete < 100)
|
||||||
|
printf("[%d]:%d%%\n", pThreadInfo->threadID, percentComplete);
|
||||||
|
|
||||||
free_of_interlace:
|
free_of_interlace:
|
||||||
tmfree(pThreadInfo->buffer);
|
tmfree(pThreadInfo->buffer);
|
||||||
|
@ -6641,6 +6649,9 @@ static void* syncWriteProgressive(threadInfo *pThreadInfo) {
|
||||||
|
|
||||||
pThreadInfo->samplePos = 0;
|
pThreadInfo->samplePos = 0;
|
||||||
|
|
||||||
|
int percentComplete = 0;
|
||||||
|
int64_t totalRows = insertRows * pThreadInfo->ntables;
|
||||||
|
|
||||||
for (uint64_t tableSeq = pThreadInfo->start_table_from;
|
for (uint64_t tableSeq = pThreadInfo->start_table_from;
|
||||||
tableSeq <= pThreadInfo->end_table_to;
|
tableSeq <= pThreadInfo->end_table_to;
|
||||||
tableSeq ++) {
|
tableSeq ++) {
|
||||||
|
@ -6746,6 +6757,11 @@ static void* syncWriteProgressive(threadInfo *pThreadInfo) {
|
||||||
|
|
||||||
pThreadInfo->totalAffectedRows += affectedRows;
|
pThreadInfo->totalAffectedRows += affectedRows;
|
||||||
|
|
||||||
|
int currentPercent = pThreadInfo->totalAffectedRows * 100 / totalRows;
|
||||||
|
if (currentPercent > percentComplete ) {
|
||||||
|
printf("[%d]:%d%%\n", pThreadInfo->threadID, currentPercent);
|
||||||
|
percentComplete = currentPercent;
|
||||||
|
}
|
||||||
int64_t currentPrintTime = taosGetTimestampMs();
|
int64_t currentPrintTime = taosGetTimestampMs();
|
||||||
if (currentPrintTime - lastPrintTime > 30*1000) {
|
if (currentPrintTime - lastPrintTime > 30*1000) {
|
||||||
printf("thread[%d] has currently inserted rows: %"PRId64 ", affected rows: %"PRId64 "\n",
|
printf("thread[%d] has currently inserted rows: %"PRId64 ", affected rows: %"PRId64 "\n",
|
||||||
|
@ -6768,6 +6784,8 @@ static void* syncWriteProgressive(threadInfo *pThreadInfo) {
|
||||||
__func__, __LINE__, pThreadInfo->samplePos);
|
__func__, __LINE__, pThreadInfo->samplePos);
|
||||||
}
|
}
|
||||||
} // tableSeq
|
} // tableSeq
|
||||||
|
if (percentComplete < 100)
|
||||||
|
printf("[%d]:%d%%\n", pThreadInfo->threadID, percentComplete);
|
||||||
|
|
||||||
free_of_progressive:
|
free_of_progressive:
|
||||||
tmfree(pThreadInfo->buffer);
|
tmfree(pThreadInfo->buffer);
|
||||||
|
|
|
@ -4047,9 +4047,9 @@ void block_func_merge(SQLFunctionCtx* pCtx) {
|
||||||
STableBlockDist info = {0};
|
STableBlockDist info = {0};
|
||||||
int32_t len = *(int32_t*) pCtx->pInput;
|
int32_t len = *(int32_t*) pCtx->pInput;
|
||||||
blockDistInfoFromBinary(((char*)pCtx->pInput) + sizeof(int32_t), len, &info);
|
blockDistInfoFromBinary(((char*)pCtx->pInput) + sizeof(int32_t), len, &info);
|
||||||
|
|
||||||
SResultRowCellInfo *pResInfo = GET_RES_INFO(pCtx);
|
SResultRowCellInfo *pResInfo = GET_RES_INFO(pCtx);
|
||||||
mergeTableBlockDist(pResInfo, &info);
|
mergeTableBlockDist(pResInfo, &info);
|
||||||
|
taosArrayDestroy(info.dataBlockInfos);
|
||||||
|
|
||||||
pResInfo->numOfRes = 1;
|
pResInfo->numOfRes = 1;
|
||||||
pResInfo->hasResult = DATA_SET_FLAG;
|
pResInfo->hasResult = DATA_SET_FLAG;
|
||||||
|
|
|
@ -330,7 +330,7 @@ void intDataTest() {
|
||||||
filterAddRange(h, ra + i, TSDB_RELATION_AND);
|
filterAddRange(h, ra + i, TSDB_RELATION_AND);
|
||||||
}
|
}
|
||||||
filterGetRangeNum(h, &num);
|
filterGetRangeNum(h, &num);
|
||||||
ASSERT_EQ(num, 0);
|
ASSERT_EQ(num, 1);
|
||||||
filterFreeRangeCtx(h);
|
filterFreeRangeCtx(h);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -280,25 +280,26 @@ int WCSPatternMatch(const wchar_t *patterStr, const wchar_t *str, size_t size, c
|
||||||
|
|
||||||
int32_t compareStrPatternComp(const void* pLeft, const void* pRight) {
|
int32_t compareStrPatternComp(const void* pLeft, const void* pRight) {
|
||||||
SPatternCompareInfo pInfo = {'%', '_'};
|
SPatternCompareInfo pInfo = {'%', '_'};
|
||||||
|
|
||||||
char pattern[128] = {0};
|
assert(varDataLen(pRight) <= TSDB_MAX_FIELD_LEN);
|
||||||
|
char *pattern = calloc(varDataLen(pRight) + 1, sizeof(char));
|
||||||
memcpy(pattern, varDataVal(pRight), varDataLen(pRight));
|
memcpy(pattern, varDataVal(pRight), varDataLen(pRight));
|
||||||
assert(varDataLen(pRight) < 128);
|
|
||||||
|
|
||||||
size_t sz = varDataLen(pLeft);
|
size_t sz = varDataLen(pLeft);
|
||||||
char *buf = malloc(sz + 1);
|
char *buf = malloc(sz + 1);
|
||||||
memcpy(buf, varDataVal(pLeft), sz);
|
memcpy(buf, varDataVal(pLeft), sz);
|
||||||
buf[sz] = 0;
|
buf[sz] = 0;
|
||||||
|
|
||||||
int32_t ret = patternMatch(pattern, buf, sz, &pInfo);
|
int32_t ret = patternMatch(pattern, buf, sz, &pInfo);
|
||||||
free(buf);
|
free(buf);
|
||||||
|
free(pattern);
|
||||||
return (ret == TSDB_PATTERN_MATCH) ? 0 : 1;
|
return (ret == TSDB_PATTERN_MATCH) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t taosArrayCompareString(const void* a, const void* b) {
|
int32_t taosArrayCompareString(const void* a, const void* b) {
|
||||||
const char* x = *(const char**)a;
|
const char* x = *(const char**)a;
|
||||||
const char* y = *(const char**)b;
|
const char* y = *(const char**)b;
|
||||||
|
|
||||||
return compareLenPrefixedStr(x, y);
|
return compareLenPrefixedStr(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,19 +308,19 @@ int32_t taosArrayCompareString(const void* a, const void* b) {
|
||||||
// return taosArraySearchString(arr, pLeft, taosArrayCompareString, TD_EQ) == NULL ? 0 : 1;
|
// return taosArraySearchString(arr, pLeft, taosArrayCompareString, TD_EQ) == NULL ? 0 : 1;
|
||||||
//}
|
//}
|
||||||
int32_t compareFindItemInSet(const void *pLeft, const void* pRight) {
|
int32_t compareFindItemInSet(const void *pLeft, const void* pRight) {
|
||||||
return NULL != taosHashGet((SHashObj *)pRight, varDataVal(pLeft), varDataLen(pLeft)) ? 1 : 0;
|
return NULL != taosHashGet((SHashObj *)pRight, varDataVal(pLeft), varDataLen(pLeft)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t compareWStrPatternComp(const void* pLeft, const void* pRight) {
|
int32_t compareWStrPatternComp(const void* pLeft, const void* pRight) {
|
||||||
SPatternCompareInfo pInfo = {'%', '_'};
|
SPatternCompareInfo pInfo = {'%', '_'};
|
||||||
|
|
||||||
wchar_t pattern[128] = {0};
|
assert(varDataLen(pRight) <= TSDB_MAX_FIELD_LEN * TSDB_NCHAR_SIZE);
|
||||||
assert(TSDB_PATTERN_STRING_MAX_LEN < 128);
|
wchar_t *pattern = calloc(varDataLen(pRight) + 1, sizeof(wchar_t));
|
||||||
|
|
||||||
memcpy(pattern, varDataVal(pRight), varDataLen(pRight));
|
memcpy(pattern, varDataVal(pRight), varDataLen(pRight));
|
||||||
assert(varDataLen(pRight) < 128);
|
|
||||||
|
|
||||||
int32_t ret = WCSPatternMatch(pattern, varDataVal(pLeft), varDataLen(pLeft)/TSDB_NCHAR_SIZE, &pInfo);
|
int32_t ret = WCSPatternMatch(pattern, varDataVal(pLeft), varDataLen(pLeft)/TSDB_NCHAR_SIZE, &pInfo);
|
||||||
|
free(pattern);
|
||||||
return (ret == TSDB_PATTERN_MATCH) ? 0 : 1;
|
return (ret == TSDB_PATTERN_MATCH) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17742,4 +17742,370 @@
|
||||||
fun:taosGetFqdn
|
fun:taosGetFqdn
|
||||||
fun:taosCheckGlobalCfg
|
fun:taosCheckGlobalCfg
|
||||||
fun:taos_init_imp
|
fun:taos_init_imp
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyObject_GetItem
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
fun:PyCode_NewWithPosOnlyArgs
|
||||||
|
fun:PyCode_New
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/tslibs/parsing.cpython-38-x86_64-linux-gnu.so
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/tslibs/parsing.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/local/lib/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_New
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_New
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun: malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/interval.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun: malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyObject_CallFunctionObjArgs
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyObject_GetAttr
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8)
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8)
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
obj:/usr/bin/python3.8)
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8)
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/interval.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8)
|
||||||
|
obj:/usr/bin/python3.8)
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/tslibs/np_datetime.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/tslibs/ccalendar.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/interval.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_Pack
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/hashtable.cpython-38-x86_64-linux-gnu.so
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/_libs/hashtable.cpython-38-x86_64-linux-gnu.so
|
||||||
|
fun:PyModule_ExecDef
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyVectorcall_Call
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
...
|
||||||
|
obj:/usr/local/lib/python3.8/dist-packages/pandas/*
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_New
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_New
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyObject_MakeTpCall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyObject_GetAttr
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
}
|
||||||
|
{
|
||||||
|
<insert_a_suppression_name_here>
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: definite
|
||||||
|
fun:malloc
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:PyTuple_New
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
obj:/usr/bin/python3.8
|
||||||
|
fun:_PyEval_EvalFrameDefault
|
||||||
|
fun:_PyEval_EvalCodeWithName
|
||||||
|
fun:_PyFunction_Vectorcall
|
||||||
|
}
|
|
@ -157,19 +157,6 @@ class TDTestCase:
|
||||||
tdSql.execute(f'create table {table_name}_sub1 using {table_name} tags ("{table_name}", "{table_name}")')
|
tdSql.execute(f'create table {table_name}_sub1 using {table_name} tags ("{table_name}", "{table_name}")')
|
||||||
tdSql.execute(f'insert into {table_name}_sub1 values (now, "{table_name}", "{table_name}");')
|
tdSql.execute(f'insert into {table_name}_sub1 values (now, "{table_name}", "{table_name}");')
|
||||||
|
|
||||||
# TODO sc1 leave a bug ---> TD-5918
|
|
||||||
# sql_list = [f'select * from {table_name} where bi1 like "{hp_name}"',
|
|
||||||
# f'select * from {table_name} where bi1 like "{lp_name}"',
|
|
||||||
# f'select * from {table_name} where bi1 like "{ul_name}"',
|
|
||||||
# f'select * from {table_name} where nc1 like "{hp_name}"',
|
|
||||||
# f'select * from {table_name} where nc1 like "{lp_name}"',
|
|
||||||
# f'select * from {table_name} where nc1 like "{ul_name}"',
|
|
||||||
# f'select * from {table_name} where si1 like "{hp_name}"',
|
|
||||||
# f'select * from {table_name} where si1 like "{lp_name}"',
|
|
||||||
# f'select * from {table_name} where si1 like "{ul_name}"',
|
|
||||||
# f'select * from {table_name} where sc1 like "{hp_name}"',
|
|
||||||
# f'select * from {table_name} where sc1 like "{lp_name}"',
|
|
||||||
# f'select * from {table_name} where sc1 like "{ul_name}"']
|
|
||||||
sql_list = [f'select * from {table_name} where bi1 like "{hp_name}"',
|
sql_list = [f'select * from {table_name} where bi1 like "{hp_name}"',
|
||||||
f'select * from {table_name} where bi1 like "{lp_name}"',
|
f'select * from {table_name} where bi1 like "{lp_name}"',
|
||||||
f'select * from {table_name} where bi1 like "{ul_name}"',
|
f'select * from {table_name} where bi1 like "{ul_name}"',
|
||||||
|
@ -178,7 +165,11 @@ class TDTestCase:
|
||||||
f'select * from {table_name} where nc1 like "{ul_name}"',
|
f'select * from {table_name} where nc1 like "{ul_name}"',
|
||||||
f'select * from {table_name} where si1 like "{hp_name}"',
|
f'select * from {table_name} where si1 like "{hp_name}"',
|
||||||
f'select * from {table_name} where si1 like "{lp_name}"',
|
f'select * from {table_name} where si1 like "{lp_name}"',
|
||||||
f'select * from {table_name} where si1 like "{ul_name}"']
|
f'select * from {table_name} where si1 like "{ul_name}"',
|
||||||
|
f'select * from {table_name} where sc1 like "{hp_name}"',
|
||||||
|
f'select * from {table_name} where sc1 like "{lp_name}"',
|
||||||
|
f'select * from {table_name} where sc1 like "{ul_name}"']
|
||||||
|
|
||||||
for sql in sql_list:
|
for sql in sql_list:
|
||||||
tdSql.query(sql)
|
tdSql.query(sql)
|
||||||
if len(table_name) >= 1:
|
if len(table_name) >= 1:
|
||||||
|
@ -211,7 +202,6 @@ class TDTestCase:
|
||||||
tdSql.close()
|
tdSql.close()
|
||||||
tdLog.success("%s successfully executed" % __file__)
|
tdLog.success("%s successfully executed" % __file__)
|
||||||
|
|
||||||
|
|
||||||
tdCases.addWindows(__file__, TDTestCase())
|
tdCases.addWindows(__file__, TDTestCase())
|
||||||
tdCases.addLinux(__file__, TDTestCase())
|
tdCases.addLinux(__file__, TDTestCase())
|
||||||
|
|
||||||
|
|
|
@ -19,11 +19,16 @@ import json
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
class taosdemoPerformace:
|
class taosdemoPerformace:
|
||||||
def __init__(self, commitID, dbName, branch, type):
|
def __init__(self, commitID, dbName, branch, type, numOfTables, numOfRows, numOfInt, numOfDouble, numOfBinary):
|
||||||
self.commitID = commitID
|
self.commitID = commitID
|
||||||
self.dbName = dbName
|
self.dbName = dbName
|
||||||
self.branch = branch
|
self.branch = branch
|
||||||
self.type = type
|
self.type = type
|
||||||
|
self.numOfTables = numOfTables
|
||||||
|
self.numOfRows = numOfRows
|
||||||
|
self.numOfInt = numOfInt
|
||||||
|
self.numOfDouble = numOfDouble
|
||||||
|
self.numOfBinary = numOfBinary
|
||||||
self.host = "127.0.0.1"
|
self.host = "127.0.0.1"
|
||||||
self.user = "root"
|
self.user = "root"
|
||||||
self.password = "taosdata"
|
self.password = "taosdata"
|
||||||
|
@ -51,13 +56,13 @@ class taosdemoPerformace:
|
||||||
stb = {
|
stb = {
|
||||||
"name": "meters",
|
"name": "meters",
|
||||||
"child_table_exists": "no",
|
"child_table_exists": "no",
|
||||||
"childtable_count": 10000,
|
"childtable_count": self.numOfTables,
|
||||||
"childtable_prefix": "stb_",
|
"childtable_prefix": "stb_",
|
||||||
"auto_create_table": "no",
|
"auto_create_table": "no",
|
||||||
"data_source": "rand",
|
"data_source": "rand",
|
||||||
"batch_create_tbl_num": 10,
|
"batch_create_tbl_num": 10,
|
||||||
"insert_mode": "taosc",
|
"insert_mode": "taosc",
|
||||||
"insert_rows": 100000,
|
"insert_rows": self.numOfRows,
|
||||||
"interlace_rows": 100,
|
"interlace_rows": 100,
|
||||||
"max_sql_len": 1024000,
|
"max_sql_len": 1024000,
|
||||||
"disorder_ratio": 0,
|
"disorder_ratio": 0,
|
||||||
|
@ -68,7 +73,9 @@ class taosdemoPerformace:
|
||||||
"sample_file": "./sample.csv",
|
"sample_file": "./sample.csv",
|
||||||
"tags_file": "",
|
"tags_file": "",
|
||||||
"columns": [
|
"columns": [
|
||||||
{"type": "INT", "count": 4}
|
{"type": "INT", "count": self.numOfInt},
|
||||||
|
{"type": "DOUBLE", "count": self.numOfDouble},
|
||||||
|
{"type": "BINARY", "len": 128, "count": self.numOfBinary}
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
{"type": "INT", "count": 1},
|
{"type": "INT", "count": 1},
|
||||||
|
@ -76,6 +83,7 @@ class taosdemoPerformace:
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
stables = []
|
stables = []
|
||||||
stables.append(stb)
|
stables.append(stb)
|
||||||
|
|
||||||
|
@ -163,7 +171,7 @@ class taosdemoPerformace:
|
||||||
|
|
||||||
cursor.execute("create database if not exists %s" % self.dbName)
|
cursor.execute("create database if not exists %s" % self.dbName)
|
||||||
cursor.execute("use %s" % self.dbName)
|
cursor.execute("use %s" % self.dbName)
|
||||||
cursor.execute("create table if not exists taosdemo_perf (ts timestamp, create_table_time float, insert_records_time float, records_per_second float, commit_id binary(50), avg_delay float, max_delay float, min_delay float, branch binary(50), type binary(20))")
|
cursor.execute("create table if not exists taosdemo_perf (ts timestamp, create_table_time float, insert_records_time float, records_per_second float, commit_id binary(50), avg_delay float, max_delay float, min_delay float, branch binary(50), type binary(20), numoftables int, numofrows int, numofint int, numofdouble int, numofbinary int)")
|
||||||
print("==================== taosdemo performance ====================")
|
print("==================== taosdemo performance ====================")
|
||||||
print("create tables time: %f" % float(self.createTableTime))
|
print("create tables time: %f" % float(self.createTableTime))
|
||||||
print("insert records time: %f" % float(self.insertRecordsTime))
|
print("insert records time: %f" % float(self.insertRecordsTime))
|
||||||
|
@ -171,13 +179,14 @@ class taosdemoPerformace:
|
||||||
print("avg delay: %f" % float(self.avgDelay))
|
print("avg delay: %f" % float(self.avgDelay))
|
||||||
print("max delay: %f" % float(self.maxDelay))
|
print("max delay: %f" % float(self.maxDelay))
|
||||||
print("min delay: %f" % float(self.minDelay))
|
print("min delay: %f" % float(self.minDelay))
|
||||||
cursor.execute("insert into taosdemo_perf values(now, %f, %f, %f, '%s', %f, %f, %f, '%s', '%s')" %
|
cursor.execute("insert into taosdemo_perf values(now, %f, %f, %f, '%s', %f, %f, %f, '%s', '%s', %d, %d, %d, %d, %d)" %
|
||||||
(float(self.createTableTime), float(self.insertRecordsTime), float(self.recordsPerSecond),
|
(float(self.createTableTime), float(self.insertRecordsTime), float(self.recordsPerSecond),
|
||||||
self.commitID, float(self.avgDelay), float(self.maxDelay), float(self.minDelay), self.branch, self.type))
|
self.commitID, float(self.avgDelay), float(self.maxDelay), float(self.minDelay), self.branch,
|
||||||
|
self.type, self.numOfTables, self.numOfRows, self.numOfInt, self.numOfDouble, self.numOfBinary))
|
||||||
cursor.close()
|
cursor.close()
|
||||||
|
|
||||||
cursor1 = self.conn.cursor()
|
cursor1 = self.conn.cursor()
|
||||||
cursor1.execute("drop database if exists %s" % self.insertDB)
|
# cursor1.execute("drop database if exists %s" % self.insertDB)
|
||||||
cursor1.close()
|
cursor1.close()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -209,8 +218,43 @@ if __name__ == '__main__':
|
||||||
default='glibc',
|
default='glibc',
|
||||||
type=str,
|
type=str,
|
||||||
help='build type (default: glibc)')
|
help='build type (default: glibc)')
|
||||||
|
parser.add_argument(
|
||||||
|
'-i',
|
||||||
|
'--num-of-int',
|
||||||
|
action='store',
|
||||||
|
default=4,
|
||||||
|
type=int,
|
||||||
|
help='num of int columns (default: 4)')
|
||||||
|
parser.add_argument(
|
||||||
|
'-D',
|
||||||
|
'--num-of-double',
|
||||||
|
action='store',
|
||||||
|
default=0,
|
||||||
|
type=int,
|
||||||
|
help='num of double columns (default: 4)')
|
||||||
|
parser.add_argument(
|
||||||
|
'-B',
|
||||||
|
'--num-of-binary',
|
||||||
|
action='store',
|
||||||
|
default=0,
|
||||||
|
type=int,
|
||||||
|
help='num of binary columns (default: 4)')
|
||||||
|
parser.add_argument(
|
||||||
|
'-t',
|
||||||
|
'--num-of-tables',
|
||||||
|
action='store',
|
||||||
|
default=10000,
|
||||||
|
type=int,
|
||||||
|
help='num of tables (default: 10000)')
|
||||||
|
parser.add_argument(
|
||||||
|
'-r',
|
||||||
|
'--num-of-rows',
|
||||||
|
action='store',
|
||||||
|
default=100000,
|
||||||
|
type=int,
|
||||||
|
help='num of rows (default: 100000)')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
perftest = taosdemoPerformace(args.commit_id, args.database_name, args.git_branch, args.build_type)
|
perftest = taosdemoPerformace(args.commit_id, args.database_name, args.git_branch, args.build_type, args.num_of_tables, args.num_of_rows, args.num_of_int, args.num_of_double, args.num_of_binary)
|
||||||
perftest.insertData()
|
perftest.insertData()
|
||||||
perftest.createTablesAndStoreData()
|
perftest.createTablesAndStoreData()
|
||||||
|
|
Loading…
Reference in New Issue