提交 161737b7 编写于 作者: Z zhihaop

Merge branch '2.6' into improve/taosc-async-enhancement-for-2.6

......@@ -23,31 +23,31 @@ def sync_source() {
sh '''
cd ${WKC}
git clean -fxd
git checkout master
git checkout -f master
'''
} else if (env.CHANGE_TARGET == '2.0') {
sh '''
cd ${WKC}
git clean -fxd
git checkout 2.0
git checkout -f 2.0
'''
} else if (env.CHANGE_TARGET == '2.4') {
sh '''
cd ${WKC}
git clean -fxd
git checkout 2.4
git checkout -f 2.4
'''
} else if (env.CHANGE_TARGET == '2.6') {
sh '''
cd ${WKC}
git clean -fxd
git checkout 2.6
git checkout -f 2.6
'''
} else {
sh '''
cd ${WKC}
git clean -fxd
git checkout develop
git checkout -f develop
'''
}
}
......@@ -79,7 +79,7 @@ def sync_source() {
} else if (env.CHANGE_TARGET == '2.6') {
sh '''
cd ${WK}
git checkout 2.6
git checkout -f 2.6
'''
} else {
sh '''
......@@ -194,47 +194,47 @@ def pre_test_win(){
if (env.CHANGE_TARGET == 'master') {
bat '''
cd %WIN_INTERNAL_ROOT%
git checkout master
git checkout -f master
'''
bat '''
cd %WIN_COMMUNITY_ROOT%
git checkout master
git checkout -f master
'''
} else if (env.CHANGE_TARGET == '2.0') {
bat '''
cd %WIN_INTERNAL_ROOT%
git checkout 2.0
git checkout -f 2.0
'''
bat '''
cd %WIN_COMMUNITY_ROOT%
git checkout 2.0
git checkout -f 2.0
'''
} else if (env.CHANGE_TARGET == '2.4') {
bat '''
cd %WIN_INTERNAL_ROOT%
git checkout 2.4
git checkout -f 2.4
'''
bat '''
cd %WIN_COMMUNITY_ROOT%
git checkout 2.4
git checkout -f 2.4
'''
} else if (env.CHANGE_TARGET == '2.6') {
bat '''
cd %WIN_INTERNAL_ROOT%
git checkout 2.6
git checkout -f 2.6
'''
bat '''
cd %WIN_COMMUNITY_ROOT%
git checkout 2.6
git checkout -f 2.6
'''
} else {
bat '''
cd %WIN_INTERNAL_ROOT%
git checkout develop
git checkout -f develop
'''
bat '''
cd %WIN_COMMUNITY_ROOT%
git checkout develop
git checkout -f develop
'''
}
}
......
......@@ -337,6 +337,26 @@ bool appendTagsFilter(SSqlObj* pSql) {
return false;
}
// check tags is blank or ''
char* p1 = pTscObj->tags;
if (strcmp(p1, "\'\'") == 0) {
tscDebug("TAGS 0x%" PRIx64 " tags is empty. user=%s", pSql->self, pTscObj->user);
return false;
}
bool blank = true;
while(*p1 != 0) {
if(*p1 != ' ') {
blank = false;
break;
}
++p1;
}
// result
if(blank) {
tscDebug("TAGS 0x%" PRIx64 " tags is all blank. user=%s", pSql->self, pTscObj->user);
return false;
}
char * p = insertTags(pSql->sqlstr, pTscObj->tags);
if(p == NULL) {
return false;
......
......@@ -862,7 +862,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
const char* msg3 = "name too long";
const char* msg5 = "invalid user rights";
const char* msg7 = "not support options";
const char* msg8 = "tags filter length must over 3 bytes.";
const char* msg8 = "tags filter string length must less than 255 bytes.";
pCmd->command = pInfo->type;
......@@ -903,8 +903,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
}
} else if (pUser->type == TSDB_ALTER_USER_TAGS) {
SStrToken* pTags = &pUser->tags;
if(pTags->n < 4)
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8);
if (pTags->n > TSDB_TAGS_LEN - 1 ) return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8);
} else {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg7);
}
......
......@@ -377,7 +377,7 @@ void shellRunCommandOnServer(TAOS *con, char command[]) {
} else {
int num_rows_affacted = taos_affected_rows(pSql);
et = taosGetTimestampUs();
printf("Query OK, %d of %d row(s) in database (%.6fs)\n", num_rows_affacted, num_rows_affacted, (et - st) / 1E6);
printf("Query OK, %d row(s) affected in set (%.6fs)\n", num_rows_affacted, (et - st) / 1E6);
#ifndef WINDOWS
// call auto tab
......
......@@ -2504,6 +2504,7 @@ static int32_t mnodeChangeNormalTableColumn(SMnodeMsg *pMsg) {
SSchema *schema = (SSchema *) (pTable->schema + col);
ASSERT(schema->type == TSDB_DATA_TYPE_BINARY || schema->type == TSDB_DATA_TYPE_NCHAR);
schema->bytes = pAlter->schema[0].bytes;
++pTable->sversion;
mInfo("msg:%p, app:%p ctable %s, start to modify column %s len to %d", pMsg, pMsg->rpcMsg.ahandle, pTable->info.tableId,
name, schema->bytes);
......
......@@ -97,7 +97,7 @@ static int32_t mnodeUserActionDecode(SSdbRow *pRow) {
SUserObj *pUser = (SUserObj *)calloc(1, sizeof(SUserObj));
if (pUser == NULL) return TSDB_CODE_MND_OUT_OF_MEMORY;
memcpy(pUser, pRow->rowData, tsUserUpdateSize);
memcpy(pUser, pRow->rowData, pRow->rowSize);
pRow->pObj = pUser;
return TSDB_CODE_SUCCESS;
}
......
......@@ -161,6 +161,8 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
vTrace("vgId:%d, submit msg is processed", pVnode->vgId);
int64_t submitStartUs = taosGetTimestampUs();
if (pVnode->dbType == TSDB_DB_TYPE_TOPIC && pVnode->role == TAOS_SYNC_ROLE_MASTER) {
tpUpdateTs(pVnode->vgId, &pVnode->sequence, pCont);
}
......@@ -186,6 +188,11 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
atomic_fetch_add_64(&tsSubmitRowSucNum, ntohl(pRsp->affectedRows));
}
int64_t submitEndUs = taosGetTimestampUs();
if (submitEndUs - submitStartUs > 10 * 1000000) {
vWarn("vgId: %d, submit msg process takes more than 10s", pVnode->vgId);
}
return code;
}
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ======== step1 create db
sql drop database if exists db1;
sql CREATE DATABASE db1;
sql use db1;
print ======== step2 create normal table
sql CREATE TABLE normal_t1('ts' TIMESTAMP, 'c1' BINARY(1));
print ======== step3 alter column width
sql alter table db1.normal_t1 modify column c1 binary(2400);
print ======== step4 insert into 20 rows
$ms = 0
$cnt = 0
while $cnt < 20
$ms = $cnt . m
sql insert into normal_t1(ts,c1) values(now + $ms , '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789');
$cnt = $cnt + 1
endw
########################################################
print ===> step 4 stop dnode1
system sh/exec.sh -n dnode1 -s stop -x SIGINT
########################################################
print ===> step 5 start dnode1
system sh/exec.sh -n dnode1 -s start
sleep 1000
sql select count(*) from db1.normal_t1;
print $data00
if $rows != 1 then
return -1
endi
if $data00 != 20 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -193,6 +193,7 @@ cd ../../../debug; make
./test.sh -f general/alter/insert2.sim
./test.sh -f general/alter/metrics.sim
./test.sh -f general/alter/table.sim
./test.sh -f general/alter/column_width_commit.sim
./test.sh -f general/cache/new_metrics.sim
./test.sh -f general/cache/restart_metrics.sim
./test.sh -f general/cache/restart_table.sim
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册