提交 164a7c47 编写于 作者: T tickduan

Merge branch 'master' into cq

version: 1.0.{build} version: 1.0.{build}
image: image:
- Visual Studio 2015 - Visual Studio 2015
- macos - macos
environment: environment:
matrix: matrix:
- ARCH: amd64 - ARCH: amd64
- ARCH: x86 - ARCH: x86
matrix: matrix:
exclude: exclude:
- image: macos - image: macos
ARCH: x86 ARCH: x86
for: for:
- -
matrix: matrix:
only: only:
- image: Visual Studio 2015 - image: Visual Studio 2015
clone_folder: c:\dev\TDengine clone_folder: c:\dev\TDengine
clone_depth: 1 clone_depth: 1
init: init:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH% - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%
before_build: before_build:
- cd c:\dev\TDengine - cd c:\dev\TDengine
- md build - md build
build_script: build_script:
- cd build - cd build
- cmake -G "NMake Makefiles" .. - cmake -G "NMake Makefiles" .. -DBUILD_JDBC=false
- nmake install - nmake install
- -
matrix: matrix:
only: only:
- image: macos - image: macos
clone_depth: 1 clone_depth: 1
build_script: build_script:
- mkdir debug - mkdir debug
- cd debug - cd debug
- cmake .. > /dev/null - cmake .. > /dev/null
- make > /dev/null - make > /dev/null
notifications: notifications:
- provider: Email - provider: Email
to: to:
- sangshuduo@gmail.com - sangshuduo@gmail.com
on_build_success: true on_build_success: true
on_build_failure: true on_build_failure: true
on_build_status_changed: true on_build_status_changed: true
...@@ -14,11 +14,13 @@ MESSAGE(STATUS "Project binary files output path: " ${PROJECT_BINARY_DIR}) ...@@ -14,11 +14,13 @@ MESSAGE(STATUS "Project binary files output path: " ${PROJECT_BINARY_DIR})
MESSAGE(STATUS "Project executable files output path: " ${EXECUTABLE_OUTPUT_PATH}) MESSAGE(STATUS "Project executable files output path: " ${EXECUTABLE_OUTPUT_PATH})
MESSAGE(STATUS "Project library files output path: " ${LIBRARY_OUTPUT_PATH}) MESSAGE(STATUS "Project library files output path: " ${LIBRARY_OUTPUT_PATH})
FIND_PROGRAM(TD_MVN_INSTALLED mvn) IF (TD_BUILD_JDBC)
IF (TD_MVN_INSTALLED) FIND_PROGRAM(TD_MVN_INSTALLED mvn)
MESSAGE(STATUS "MVN is installed and JDBC will be compiled") IF (TD_MVN_INSTALLED)
ELSE () MESSAGE(STATUS "MVN is installed and JDBC will be compiled")
MESSAGE(STATUS "MVN is not installed and JDBC is not compiled") ELSE ()
MESSAGE(STATUS "MVN is not installed and JDBC is not compiled")
ENDIF ()
ENDIF () ENDIF ()
# #
...@@ -54,4 +56,4 @@ ELSE () ...@@ -54,4 +56,4 @@ ELSE ()
SET(CMAKE_BUILD_TYPE "Debug") SET(CMAKE_BUILD_TYPE "Debug")
MESSAGE(STATUS "Build Debug Version as default") MESSAGE(STATUS "Build Debug Version as default")
ENDIF() ENDIF()
ENDIF () ENDIF ()
\ No newline at end of file
...@@ -72,3 +72,9 @@ IF (${RANDOM_NETWORK_FAIL} MATCHES "true") ...@@ -72,3 +72,9 @@ IF (${RANDOM_NETWORK_FAIL} MATCHES "true")
SET(TD_RANDOM_NETWORK_FAIL TRUE) SET(TD_RANDOM_NETWORK_FAIL TRUE)
MESSAGE(STATUS "build with random-network-fail enabled") MESSAGE(STATUS "build with random-network-fail enabled")
ENDIF () ENDIF ()
SET(TD_BUILD_JDBC TRUE)
IF (${BUILD_JDBC} MATCHES "false")
SET(TD_BUILD_JDBC FALSE)
ENDIF ()
...@@ -5648,11 +5648,17 @@ static int32_t setKeepOption(SSqlCmd* pCmd, SCreateDbMsg* pMsg, SCreateDbInfo* p ...@@ -5648,11 +5648,17 @@ static int32_t setKeepOption(SSqlCmd* pCmd, SCreateDbMsg* pMsg, SCreateDbInfo* p
tVariantListItem* p0 = taosArrayGet(pKeep, 0); tVariantListItem* p0 = taosArrayGet(pKeep, 0);
switch (s) { switch (s) {
case 1: { case 1: {
if ((int32_t)p0->pVar.i64 <= 0) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg);
}
pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64); pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64);
} }
break; break;
case 2: { case 2: {
tVariantListItem* p1 = taosArrayGet(pKeep, 1); tVariantListItem* p1 = taosArrayGet(pKeep, 1);
if ((int32_t)p0->pVar.i64 <= 0 || (int32_t)p1->pVar.i64 <= 0) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg);
}
pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64); pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64);
pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64); pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64);
break; break;
...@@ -5661,6 +5667,10 @@ static int32_t setKeepOption(SSqlCmd* pCmd, SCreateDbMsg* pMsg, SCreateDbInfo* p ...@@ -5661,6 +5667,10 @@ static int32_t setKeepOption(SSqlCmd* pCmd, SCreateDbMsg* pMsg, SCreateDbInfo* p
tVariantListItem* p1 = taosArrayGet(pKeep, 1); tVariantListItem* p1 = taosArrayGet(pKeep, 1);
tVariantListItem* p2 = taosArrayGet(pKeep, 2); tVariantListItem* p2 = taosArrayGet(pKeep, 2);
if ((int32_t)p0->pVar.i64 <= 0 || (int32_t)p1->pVar.i64 <= 0 || (int32_t)p2->pVar.i64 <= 0) {
return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg);
}
pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64); pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64);
pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64); pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64);
pMsg->daysToKeep2 = htonl((int32_t)p2->pVar.i64); pMsg->daysToKeep2 = htonl((int32_t)p2->pVar.i64);
......
...@@ -817,6 +817,16 @@ static void doInitGlobalConfig(void) { ...@@ -817,6 +817,16 @@ static void doInitGlobalConfig(void) {
cfg.unitType = TAOS_CFG_UTYPE_NONE; cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "precision";
cfg.ptr = &tsTimePrecision;
cfg.valType = TAOS_CFG_VTYPE_INT8;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
cfg.minValue = TSDB_MIN_PRECISION;
cfg.maxValue = TSDB_MAX_PRECISION;
cfg.ptrLength = 0;
cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg);
cfg.option = "comp"; cfg.option = "comp";
cfg.ptr = &tsCompression; cfg.ptr = &tsCompression;
cfg.valType = TAOS_CFG_VTYPE_INT8; cfg.valType = TAOS_CFG_VTYPE_INT8;
...@@ -887,6 +897,16 @@ static void doInitGlobalConfig(void) { ...@@ -887,6 +897,16 @@ static void doInitGlobalConfig(void) {
cfg.unitType = TAOS_CFG_UTYPE_NONE; cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "cachelast";
cfg.ptr = &tsCacheLastRow;
cfg.valType = TAOS_CFG_VTYPE_INT8;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
cfg.minValue = TSDB_MIN_DB_CACHE_LAST_ROW;
cfg.maxValue = TSDB_MAX_DB_CACHE_LAST_ROW;
cfg.ptrLength = 0;
cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg);
cfg.option = "mqttHostName"; cfg.option = "mqttHostName";
cfg.ptr = tsMqttHostName; cfg.ptr = tsMqttHostName;
cfg.valType = TAOS_CFG_VTYPE_STRING; cfg.valType = TAOS_CFG_VTYPE_STRING;
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
*/ */
int64_t user_mktime64(const unsigned int year0, const unsigned int mon0, int64_t user_mktime64(const unsigned int year0, const unsigned int mon0,
const unsigned int day, const unsigned int hour, const unsigned int day, const unsigned int hour,
const unsigned int min, const unsigned int sec, int64_t timezone) const unsigned int min, const unsigned int sec, int64_t time_zone)
{ {
unsigned int mon = mon0, year = year0; unsigned int mon = mon0, year = year0;
...@@ -61,7 +61,7 @@ int64_t user_mktime64(const unsigned int year0, const unsigned int mon0, ...@@ -61,7 +61,7 @@ int64_t user_mktime64(const unsigned int year0, const unsigned int mon0,
res = res*24; res = res*24;
res = ((res + hour) * 60 + min) * 60 + sec; res = ((res + hour) * 60 + min) * 60 + sec;
return (res + timezone); return (res + time_zone);
} }
// ==== mktime() kernel code =================// // ==== mktime() kernel code =================//
......
...@@ -29,8 +29,8 @@ pipeline { ...@@ -29,8 +29,8 @@ pipeline {
agent none agent none
environment{ environment{
WK = '/var/lib/jenkins/workspace/TDinternal' WK = '/data/lib/jenkins/workspace/TDinternal'
WKC= '/var/lib/jenkins/workspace/TDinternal/community' WKC= '/data/lib/jenkins/workspace/TDinternal/community'
} }
stages { stages {
......
...@@ -29,8 +29,8 @@ pipeline { ...@@ -29,8 +29,8 @@ pipeline {
agent none agent none
environment{ environment{
WK = '/var/lib/jenkins/workspace/TDinternal' WK = '/data/lib/jenkins/workspace/TDinternal'
WKC= '/var/lib/jenkins/workspace/TDinternal/community' WKC= '/data/lib/jenkins/workspace/TDinternal/community'
} }
stages { stages {
......
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
#TODO: after TD-4518 and TD-4510 is resolved, add the exception test case for these situations
import sys
from util.log import *
from util.cases import *
from util.sql import *
class TDTestCase:
def init(self, conn, logSql):
tdLog.debug("start to execute %s" % __file__)
tdSql.init(conn.cursor(), logSql)
def run(self):
tdSql.prepare()
tdSql.error('alter database keep db 0')
tdSql.error('alter database keep db -10')
tdSql.error('alter database keep db -2147483648')
#this is the test case problem for keep overflow
#the error is caught, but type is wrong.
#TODO: can be solved in the future, but improvement is minimal
tdSql.error('alter database keep db -2147483649')
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase())
\ No newline at end of file
...@@ -333,4 +333,5 @@ python3 ./test.py -f tag_lite/alter_tag.py ...@@ -333,4 +333,5 @@ python3 ./test.py -f tag_lite/alter_tag.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestInsertWithJson.py
python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py python3 test.py -f tools/taosdemoAllTest/taosdemoTestQueryWithJson.py
python3 ./test.py -f tag_lite/drop_auto_create.py python3 ./test.py -f tag_lite/drop_auto_create.py
python3 test.py -f alter/alter_keep_exception.py
#======================p4-end=============== #======================p4-end===============
...@@ -25,7 +25,7 @@ class TDTestCase: ...@@ -25,7 +25,7 @@ class TDTestCase:
def run(self): def run(self):
tdSql.query("show variables") tdSql.query("show variables")
tdSql.checkData(51, 1, 864000) tdSql.checkData(53, 1, 864000)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
...@@ -33,4 +33,4 @@ class TDTestCase: ...@@ -33,4 +33,4 @@ class TDTestCase:
tdCases.addWindows(__file__, TDTestCase()) tdCases.addWindows(__file__, TDTestCase())
tdCases.addLinux(__file__, TDTestCase()) tdCases.addLinux(__file__, TDTestCase())
\ No newline at end of file
...@@ -176,7 +176,15 @@ class TDTestCase: ...@@ -176,7 +176,15 @@ class TDTestCase:
tdSql.error("select count(join_mt0.c1), first(join_mt0.c1), first(join_mt1.c9) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts interval(10a) group by join_mt0.t1, join_mt0.t2 order by join_mt0.t1 desc slimit 3") tdSql.error("select count(join_mt0.c1), first(join_mt0.c1), first(join_mt1.c9) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts interval(10a) group by join_mt0.t1, join_mt0.t2 order by join_mt0.t1 desc slimit 3")
tdSql.error("select count(join_mt0.c1), first(join_mt0.c1) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts interval(10a) group by join_mt0.t1, join_mt0.t2, join_mt1.t1 order by join_mt0.ts desc, join_mt1.ts asc limit 10;") tdSql.error("select count(join_mt0.c1), first(join_mt0.c1) from join_mt0, join_mt1 where join_mt0.t1=join_mt1.t1 and join_mt0.ts=join_mt1.ts interval(10a) group by join_mt0.t1, join_mt0.t2, join_mt1.t1 order by join_mt0.ts desc, join_mt1.ts asc limit 10;")
tdSql.error("select join_mt1.c1,join_mt0.c1 from join_mt1,join_mt0 where join_mt1.ts = join_mt0.ts and join_mt1.t1 = join_mt0.t1 order by t") tdSql.error("select join_mt1.c1,join_mt0.c1 from join_mt1,join_mt0 where join_mt1.ts = join_mt0.ts and join_mt1.t1 = join_mt0.t1 order by t")
#TD-4458 join on database which using precision us
tdSql.execute("create database test_join_us precision 'us'")
tdSql.execute("use test_join_us")
ts = 1538548685000000
for i in range(2):
tdSql.execute("create table t%d (ts timestamp, i int)"%i)
tdSql.execute("insert into t%d values(%d,11)(%d,12)"%(i,ts,ts+1))
tdSql.query("select t1.ts from t0,t1 where t0.ts = t1.ts")
tdSql.checkData(0,0,'2018-10-03 14:38:05.000000')
def stop(self): def stop(self):
tdSql.close() tdSql.close()
......
...@@ -129,8 +129,8 @@ sql alter database db keep 20 ...@@ -129,8 +129,8 @@ sql alter database db keep 20
sql_error alter database db keep 10 sql_error alter database db keep 10
sql_error alter database db keep 9 sql_error alter database db keep 9
sql_error alter database db keep 1 sql_error alter database db keep 1
sql alter database db keep 0 sql_error alter database db keep 0
sql alter database db keep -1 sql_error alter database db keep -1
sql_error alter database db keep 365001 sql_error alter database db keep 365001
print ============== step cache print ============== step cache
......
...@@ -385,8 +385,8 @@ sql alter database db keep 20 ...@@ -385,8 +385,8 @@ sql alter database db keep 20
sql_error alter database db keep 10 sql_error alter database db keep 10
sql_error alter database db keep 9 sql_error alter database db keep 9
sql_error alter database db keep 1 sql_error alter database db keep 1
sql alter database db keep 0 sql_error alter database db keep 0
sql alter database db keep -1 sql_error alter database db keep -1
sql_error alter database db keep 365001 sql_error alter database db keep 365001
sql_error alter topic db keep 40 sql_error alter topic db keep 40
......
...@@ -233,6 +233,10 @@ totalExampleFailed=0 ...@@ -233,6 +233,10 @@ totalExampleFailed=0
if [ "${OS}" == "Linux" ]; then if [ "${OS}" == "Linux" ]; then
corepath=`grep -oP '.*(?=core_)' /proc/sys/kernel/core_pattern||grep -oP '.*(?=core-)' /proc/sys/kernel/core_pattern` corepath=`grep -oP '.*(?=core_)' /proc/sys/kernel/core_pattern||grep -oP '.*(?=core-)' /proc/sys/kernel/core_pattern`
if [ -z "$corepath" ];then
echo "/coredump/core_%e_%p_%t" > /proc/sys/kernel/core_pattern || echo "Permission denied"
corepath="/coredump/"
fi
fi fi
if [ "$2" != "jdbc" ] && [ "$2" != "python" ] && [ "$2" != "unit" ] && [ "$2" != "example" ]; then if [ "$2" != "jdbc" ] && [ "$2" != "python" ] && [ "$2" != "unit" ] && [ "$2" != "example" ]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册