Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
04771a6d
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
04771a6d
编写于
6月 21, 2022
作者:
wafwerar
提交者:
GitHub
6月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14079 from taosdata/fix/ZhiqiangWang/TD-16357-fix-sim-test-error
test: fix sim test error
上级
ed641ec4
9bde2bff
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
183 addition
and
138 deletion
+183
-138
include/os/osTime.h
include/os/osTime.h
+7
-7
include/util/tdef.h
include/util/tdef.h
+5
-5
include/util/tpagedbuf.h
include/util/tpagedbuf.h
+1
-1
include/util/types.h
include/util/types.h
+2
-2
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+2
-2
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+2
-2
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+2
-2
source/libs/function/src/tudf.c
source/libs/function/src/tudf.c
+1
-1
source/libs/index/src/index.c
source/libs/index/src/index.c
+3
-3
source/libs/index/src/indexComm.c
source/libs/index/src/indexComm.c
+3
-3
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+3
-3
source/libs/scalar/src/sclfunc.c
source/libs/scalar/src/sclfunc.c
+8
-0
source/libs/tdb/src/inc/tdbUtil.h
source/libs/tdb/src/inc/tdbUtil.h
+1
-1
source/util/src/tbuffer.c
source/util/src/tbuffer.c
+2
-2
source/util/src/tcompression.c
source/util/src/tcompression.c
+1
-1
source/util/src/tencode.c
source/util/src/tencode.c
+1
-1
tests/script/api/batchprepare.c
tests/script/api/batchprepare.c
+2
-2
tests/script/sh/abs_max.c
tests/script/sh/abs_max.c
+2
-2
tests/script/sh/demo.c
tests/script/sh/demo.c
+1
-1
tests/script/sh/deploy.bat
tests/script/sh/deploy.bat
+15
-34
tests/script/sh/exec.bat
tests/script/sh/exec.bat
+22
-0
tests/script/sh/sum_double.c
tests/script/sh/sum_double.c
+1
-1
tests/script/tsim/db/alter_option.sim
tests/script/tsim/db/alter_option.sim
+10
-2
tests/script/tsim/db/create_all_options.sim
tests/script/tsim/db/create_all_options.sim
+10
-2
tests/script/tsim/trans/create_db.sim
tests/script/tsim/trans/create_db.sim
+60
-57
tests/script/wtest.bat
tests/script/wtest.bat
+1
-0
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+15
-1
未找到文件。
include/os/osTime.h
浏览文件 @
04771a6d
...
...
@@ -38,7 +38,7 @@ extern "C" {
#define MILLISECOND_PER_SECOND (1000i64)
#else
#define MILLISECOND_PER_SECOND ((int64_t)1000L)
#define MILLISECOND_PER_SECOND ((int64_t)1000L
L
)
#endif
#define MILLISECOND_PER_MINUTE (MILLISECOND_PER_SECOND * 60)
...
...
@@ -46,9 +46,9 @@ extern "C" {
#define MILLISECOND_PER_DAY (MILLISECOND_PER_HOUR * 24)
#define MILLISECOND_PER_WEEK (MILLISECOND_PER_DAY * 7)
#define NANOSECOND_PER_USEC (1000L)
#define NANOSECOND_PER_MSEC (1000000L)
#define NANOSECOND_PER_SEC (1000000000L)
#define NANOSECOND_PER_USEC (1000L
L
)
#define NANOSECOND_PER_MSEC (1000000L
L
)
#define NANOSECOND_PER_SEC (1000000000L
L
)
#define NANOSECOND_PER_MINUTE (NANOSECOND_PER_SEC * 60)
#define NANOSECOND_PER_HOUR (NANOSECOND_PER_MINUTE * 60)
#define NANOSECOND_PER_DAY (NANOSECOND_PER_HOUR * 24)
...
...
@@ -65,21 +65,21 @@ int32_t taosGetTimestampSec();
static
FORCE_INLINE
int64_t
taosGetTimestampMs
()
{
struct
timeval
systemTime
;
taosGetTimeOfDay
(
&
systemTime
);
return
(
int64_t
)
systemTime
.
tv_sec
*
1000L
+
(
int64_t
)
systemTime
.
tv_usec
/
1000
;
return
(
int64_t
)
systemTime
.
tv_sec
*
1000L
L
+
(
int64_t
)
systemTime
.
tv_usec
/
1000
;
}
//@return timestamp in microsecond
static
FORCE_INLINE
int64_t
taosGetTimestampUs
()
{
struct
timeval
systemTime
;
taosGetTimeOfDay
(
&
systemTime
);
return
(
int64_t
)
systemTime
.
tv_sec
*
1000000L
+
(
int64_t
)
systemTime
.
tv_usec
;
return
(
int64_t
)
systemTime
.
tv_sec
*
1000000L
L
+
(
int64_t
)
systemTime
.
tv_usec
;
}
//@return timestamp in nanosecond
static
FORCE_INLINE
int64_t
taosGetTimestampNs
()
{
struct
timespec
systemTime
=
{
0
};
taosClockGetTime
(
CLOCK_REALTIME
,
&
systemTime
);
return
(
int64_t
)
systemTime
.
tv_sec
*
1000000000L
+
(
int64_t
)
systemTime
.
tv_nsec
;
return
(
int64_t
)
systemTime
.
tv_sec
*
1000000000L
L
+
(
int64_t
)
systemTime
.
tv_nsec
;
}
char
*
taosStrpTime
(
const
char
*
buf
,
const
char
*
fmt
,
struct
tm
*
tm
);
...
...
include/util/tdef.h
浏览文件 @
04771a6d
...
...
@@ -49,12 +49,12 @@ extern const int32_t TYPE_BYTES[16];
#define TSDB_DATA_BOOL_NULL 0x02
#define TSDB_DATA_TINYINT_NULL 0x80
#define TSDB_DATA_SMALLINT_NULL 0x8000
#define TSDB_DATA_INT_NULL 0x80000000L
#define TSDB_DATA_BIGINT_NULL 0x8000000000000000L
#define TSDB_DATA_INT_NULL 0x80000000L
L
#define TSDB_DATA_BIGINT_NULL 0x8000000000000000L
L
#define TSDB_DATA_TIMESTAMP_NULL TSDB_DATA_BIGINT_NULL
#define TSDB_DATA_FLOAT_NULL 0x7FF00000 // it is an NAN
#define TSDB_DATA_DOUBLE_NULL 0x7FFFFF0000000000L // an NAN
#define TSDB_DATA_DOUBLE_NULL 0x7FFFFF0000000000L
L
// an NAN
#define TSDB_DATA_NCHAR_NULL 0xFFFFFFFF
#define TSDB_DATA_BINARY_NULL 0xFF
...
...
@@ -108,8 +108,8 @@ extern const int32_t TYPE_BYTES[16];
#define TSDB_INS_USER_STABLES_DBNAME_COLID 2
#define TSDB_TICK_PER_SECOND(precision) \
((int64_t)((precision) == TSDB_TIME_PRECISION_MILLI ? 1
e3
L \
: ((precision) == TSDB_TIME_PRECISION_MICRO ? 1
e6L : 1e9
L)))
((int64_t)((precision) == TSDB_TIME_PRECISION_MILLI ? 1
000L
L \
: ((precision) == TSDB_TIME_PRECISION_MICRO ? 1
000000LL : 1000000000L
L)))
#define T_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#define T_APPEND_MEMBER(dst, ptr, type, member) \
...
...
include/util/tpagedbuf.h
浏览文件 @
04771a6d
...
...
@@ -28,7 +28,7 @@ typedef struct SArray* SIDList;
typedef
struct
SPageInfo
SPageInfo
;
typedef
struct
SDiskbasedBuf
SDiskbasedBuf
;
#define DEFAULT_INTERN_BUF_PAGE_SIZE (1024L) // in bytes
#define DEFAULT_INTERN_BUF_PAGE_SIZE (1024L
L
) // in bytes
typedef
struct
SFilePage
{
int32_t
num
;
...
...
include/util/types.h
浏览文件 @
04771a6d
...
...
@@ -32,7 +32,7 @@ extern "C" {
#define GET_UINT64_VAL(x) (*(uint64_t *)(x))
static
FORCE_INLINE
float
taos_align_get_float
(
const
char
*
pBuf
)
{
#if __STDC_VERSION__ >= 201112L
#if __STDC_VERSION__ >= 201112L
L
static_assert
(
sizeof
(
float
)
==
sizeof
(
uint32_t
),
"sizeof(float) must equal to sizeof(uint32_t)"
);
#else
assert
(
sizeof
(
float
)
==
sizeof
(
uint32_t
));
...
...
@@ -43,7 +43,7 @@ static FORCE_INLINE float taos_align_get_float(const char *pBuf) {
}
static
FORCE_INLINE
double
taos_align_get_double
(
const
char
*
pBuf
)
{
#if __STDC_VERSION__ >= 201112L
#if __STDC_VERSION__ >= 201112L
L
static_assert
(
sizeof
(
double
)
==
sizeof
(
uint64_t
),
"sizeof(double) must equal to sizeof(uint64_t)"
);
#else
assert
(
sizeof
(
double
)
==
sizeof
(
uint64_t
));
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
04771a6d
...
...
@@ -1066,11 +1066,11 @@ static int32_t getFileIdFromKey(TSKEY key, int32_t daysPerFile, int32_t precisio
}
int64_t
fid
=
(
int64_t
)(
key
/
(
daysPerFile
*
tsTickPerMin
[
precision
]));
// set the starting fileId
if
(
fid
<
0L
&&
llabs
(
fid
)
>
INT32_MAX
)
{
// data value overflow for INT32
if
(
fid
<
0L
L
&&
llabs
(
fid
)
>
INT32_MAX
)
{
// data value overflow for INT32
fid
=
INT32_MIN
;
}
if
(
fid
>
0L
&&
fid
>
INT32_MAX
)
{
if
(
fid
>
0L
L
&&
fid
>
INT32_MAX
)
{
fid
=
INT32_MAX
;
}
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
04771a6d
...
...
@@ -112,12 +112,12 @@ static void getNextTimeWindow(SInterval* pInterval, STimeWindow* tw, int32_t ord
int
mon
=
(
int
)(
tm
.
tm_year
*
12
+
tm
.
tm_mon
+
interval
*
factor
);
tm
.
tm_year
=
mon
/
12
;
tm
.
tm_mon
=
mon
%
12
;
tw
->
skey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
,
TSDB_TIME_PRECISION_MILLI
,
pInterval
->
precision
);
tw
->
skey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
L
,
TSDB_TIME_PRECISION_MILLI
,
pInterval
->
precision
);
mon
=
(
int
)(
mon
+
interval
);
tm
.
tm_year
=
mon
/
12
;
tm
.
tm_mon
=
mon
%
12
;
tw
->
ekey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
,
TSDB_TIME_PRECISION_MILLI
,
pInterval
->
precision
);
tw
->
ekey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
L
,
TSDB_TIME_PRECISION_MILLI
,
pInterval
->
precision
);
tw
->
ekey
-=
1
;
}
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
04771a6d
...
...
@@ -314,12 +314,12 @@ static void getNextTimeWindow(SInterval* pInterval, int32_t precision, int32_t o
int
mon
=
(
int
)(
tm
.
tm_year
*
12
+
tm
.
tm_mon
+
interval
*
factor
);
tm
.
tm_year
=
mon
/
12
;
tm
.
tm_mon
=
mon
%
12
;
tw
->
skey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
,
TSDB_TIME_PRECISION_MILLI
,
precision
);
tw
->
skey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
L
,
TSDB_TIME_PRECISION_MILLI
,
precision
);
mon
=
(
int
)(
mon
+
interval
);
tm
.
tm_year
=
mon
/
12
;
tm
.
tm_mon
=
mon
%
12
;
tw
->
ekey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
,
TSDB_TIME_PRECISION_MILLI
,
precision
);
tw
->
ekey
=
convertTimePrecision
((
int64_t
)
taosMktime
(
&
tm
)
*
1000L
L
,
TSDB_TIME_PRECISION_MILLI
,
precision
);
tw
->
ekey
-=
1
;
}
...
...
source/libs/function/src/tudf.c
浏览文件 @
04771a6d
...
...
@@ -467,7 +467,7 @@ int32_t getUdfdPipeName(char* pipeName, int32_t size) {
dnodeId
[
0
]
=
'1'
;
}
#ifdef _WIN32
snprintf
(
pipeName
,
size
,
"%s
%s"
,
UDF_LISTEN_PIPE_NAME_PREFIX
,
dnodeId
);
snprintf
(
pipeName
,
size
,
"%s
.%x.%s"
,
UDF_LISTEN_PIPE_NAME_PREFIX
,
MurmurHash3_32
(
tsDataDir
,
strlen
(
tsDataDir
))
,
dnodeId
);
#else
snprintf
(
pipeName
,
size
,
"%s/%s%s"
,
tsDataDir
,
UDF_LISTEN_PIPE_NAME_PREFIX
,
dnodeId
);
#endif
...
...
source/libs/index/src/index.c
浏览文件 @
04771a6d
...
...
@@ -35,12 +35,12 @@
#define INDEX_DATA_BOOL_NULL 0x02
#define INDEX_DATA_TINYINT_NULL 0x80
#define INDEX_DATA_SMALLINT_NULL 0x8000
#define INDEX_DATA_INT_NULL 0x80000000L
#define INDEX_DATA_BIGINT_NULL 0x8000000000000000L
#define INDEX_DATA_INT_NULL 0x80000000L
L
#define INDEX_DATA_BIGINT_NULL 0x8000000000000000L
L
#define INDEX_DATA_TIMESTAMP_NULL TSDB_DATA_BIGINT_NULL
#define INDEX_DATA_FLOAT_NULL 0x7FF00000 // it is an NAN
#define INDEX_DATA_DOUBLE_NULL 0x7FFFFF0000000000L // an NAN
#define INDEX_DATA_DOUBLE_NULL 0x7FFFFF0000000000L
L
// an NAN
#define INDEX_DATA_NCHAR_NULL 0xFFFFFFFF
#define INDEX_DATA_BINARY_NULL 0xFF
#define INDEX_DATA_JSON_NULL 0xFFFFFFFF
...
...
source/libs/index/src/indexComm.c
浏览文件 @
04771a6d
...
...
@@ -25,12 +25,12 @@
#define INDEX_DATA_BOOL_NULL 0x02
#define INDEX_DATA_TINYINT_NULL 0x80
#define INDEX_DATA_SMALLINT_NULL 0x8000
#define INDEX_DATA_INT_NULL 0x80000000L
#define INDEX_DATA_BIGINT_NULL 0x8000000000000000L
#define INDEX_DATA_INT_NULL 0x80000000L
L
#define INDEX_DATA_BIGINT_NULL 0x8000000000000000L
L
#define INDEX_DATA_TIMESTAMP_NULL TSDB_DATA_BIGINT_NULL
#define INDEX_DATA_FLOAT_NULL 0x7FF00000 // it is an NAN
#define INDEX_DATA_DOUBLE_NULL 0x7FFFFF0000000000L // an NAN
#define INDEX_DATA_DOUBLE_NULL 0x7FFFFF0000000000L
L
// an NAN
#define INDEX_DATA_NCHAR_NULL 0xFFFFFFFF
#define INDEX_DATA_BINARY_NULL 0xFF
#define INDEX_DATA_JSON_NULL 0xFFFFFFFF
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
04771a6d
...
...
@@ -2029,9 +2029,9 @@ static int32_t checkFill(STranslateContext* pCxt, SFillNode* pFill, SValueNode*
if
(
TIME_IS_VAR_DURATION
(
pInterval
->
unit
))
{
int64_t
f
=
1
;
if
(
pInterval
->
unit
==
'n'
)
{
f
=
30L
*
MILLISECOND_PER_DAY
;
f
=
30L
L
*
MILLISECOND_PER_DAY
;
}
else
if
(
pInterval
->
unit
==
'y'
)
{
f
=
365L
*
MILLISECOND_PER_DAY
;
f
=
365L
L
*
MILLISECOND_PER_DAY
;
}
intervalRange
=
pInterval
->
datum
.
i
*
f
;
}
else
{
...
...
@@ -2690,7 +2690,7 @@ static int64_t getUnitPerMinute(uint8_t precision) {
case
TSDB_TIME_PRECISION_MILLI
:
return
MILLISECOND_PER_MINUTE
;
case
TSDB_TIME_PRECISION_MICRO
:
return
MILLISECOND_PER_MINUTE
*
1000L
;
return
MILLISECOND_PER_MINUTE
*
1000L
L
;
case
TSDB_TIME_PRECISION_NANO
:
return
NANOSECOND_PER_MINUTE
;
default:
...
...
source/libs/scalar/src/sclfunc.c
浏览文件 @
04771a6d
...
...
@@ -1415,11 +1415,19 @@ int32_t roundFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam *pOut
}
int32_t
lowerFunction
(
SScalarParam
*
pInput
,
int32_t
inputNum
,
SScalarParam
*
pOutput
)
{
#ifdef WINDOWS
return
doCaseConvFunction
(
pInput
,
inputNum
,
pOutput
,
towlower
);
#else
return
doCaseConvFunction
(
pInput
,
inputNum
,
pOutput
,
tolower
);
#endif
}
int32_t
upperFunction
(
SScalarParam
*
pInput
,
int32_t
inputNum
,
SScalarParam
*
pOutput
)
{
#ifdef WINDOWS
return
doCaseConvFunction
(
pInput
,
inputNum
,
pOutput
,
towupper
);
#else
return
doCaseConvFunction
(
pInput
,
inputNum
,
pOutput
,
toupper
);
#endif
}
int32_t
ltrimFunction
(
SScalarParam
*
pInput
,
int32_t
inputNum
,
SScalarParam
*
pOutput
)
{
...
...
source/libs/tdb/src/inc/tdbUtil.h
浏览文件 @
04771a6d
...
...
@@ -20,7 +20,7 @@
extern
"C"
{
#endif
#if __STDC_VERSION__ >= 201112L
#if __STDC_VERSION__ >= 201112L
L
#define TDB_STATIC_ASSERT(op, info) static_assert(op, info)
#else
#define TDB_STATIC_ASSERT(op, info)
...
...
source/util/src/tbuffer.c
浏览文件 @
04771a6d
...
...
@@ -21,7 +21,7 @@ typedef union Un4B {
uint32_t
ui
;
float
f
;
}
Un4B
;
#if __STDC_VERSION__ >= 201112L
#if __STDC_VERSION__ >= 201112L
L
static_assert
(
sizeof
(
Un4B
)
==
sizeof
(
uint32_t
),
"sizeof(Un4B) must equal to sizeof(uint32_t)"
);
static_assert
(
sizeof
(
Un4B
)
==
sizeof
(
float
),
"sizeof(Un4B) must equal to sizeof(float)"
);
#endif
...
...
@@ -30,7 +30,7 @@ typedef union Un8B {
uint64_t
ull
;
double
d
;
}
Un8B
;
#if __STDC_VERSION__ >= 201112L
#if __STDC_VERSION__ >= 201112L
L
static_assert
(
sizeof
(
Un8B
)
==
sizeof
(
uint64_t
),
"sizeof(Un8B) must equal to sizeof(uint64_t)"
);
static_assert
(
sizeof
(
Un8B
)
==
sizeof
(
double
),
"sizeof(Un8B) must equal to sizeof(double)"
);
#endif
...
...
source/util/src/tcompression.c
浏览文件 @
04771a6d
...
...
@@ -58,7 +58,7 @@
static
const
int32_t
TEST_NUMBER
=
1
;
#define is_bigendian() ((*(char *)&TEST_NUMBER) == 0)
#define SIMPLE8B_MAX_INT64 ((uint64_t)2305843009213693951L)
#define SIMPLE8B_MAX_INT64 ((uint64_t)2305843009213693951L
L
)
#define safeInt64Add(a, b) (((a >= 0) && (b <= INT64_MAX - a)) || ((a < 0) && (b >= INT64_MIN - a)))
#define ZIGZAG_ENCODE(T, v) ((u##T)((v) >> (sizeof(T) * 8 - 1))) ^ (((u##T)(v)) << 1) // zigzag encode
...
...
source/util/src/tencode.c
浏览文件 @
04771a6d
...
...
@@ -16,7 +16,7 @@
#define _DEFAULT_SOURCE
#include "tencode.h"
#if __STDC_VERSION__ >= 201112L
#if __STDC_VERSION__ >= 201112L
L
static_assert
(
sizeof
(
float
)
==
sizeof
(
uint32_t
),
"sizeof(float) must equal to sizeof(uint32_t)"
);
static_assert
(
sizeof
(
double
)
==
sizeof
(
uint64_t
),
"sizeof(double) must equal to sizeof(uint64_t)"
);
#endif
...
...
tests/script/api/batchprepare.c
浏览文件 @
04771a6d
...
...
@@ -353,13 +353,13 @@ void taosMemoryFree(const void *ptr) {
static
int64_t
taosGetTimestampMs
()
{
struct
timeval
systemTime
;
taosGetTimeOfDay
(
&
systemTime
);
return
(
int64_t
)
systemTime
.
tv_sec
*
1000L
+
(
int64_t
)
systemTime
.
tv_usec
/
1000
;
return
(
int64_t
)
systemTime
.
tv_sec
*
1000L
L
+
(
int64_t
)
systemTime
.
tv_usec
/
1000
;
}
static
int64_t
taosGetTimestampUs
()
{
struct
timeval
systemTime
;
taosGetTimeOfDay
(
&
systemTime
);
return
(
int64_t
)
systemTime
.
tv_sec
*
1000000L
+
(
int64_t
)
systemTime
.
tv_usec
;
return
(
int64_t
)
systemTime
.
tv_sec
*
1000000L
L
+
(
int64_t
)
systemTime
.
tv_usec
;
}
bool
colExists
(
TAOS_MULTI_BIND
*
pBind
,
int32_t
dataType
)
{
...
...
tests/script/sh/abs_max.c
浏览文件 @
04771a6d
...
...
@@ -11,8 +11,8 @@ typedef struct SUdfInit{
}
SUdfInit
;
#define TSDB_DATA_INT_NULL 0x80000000L
#define TSDB_DATA_BIGINT_NULL 0x8000000000000000L
#define TSDB_DATA_INT_NULL 0x80000000L
L
#define TSDB_DATA_BIGINT_NULL 0x8000000000000000L
L
void
abs_max
(
char
*
data
,
short
itype
,
short
ibytes
,
int
numOfRows
,
long
long
*
ts
,
char
*
dataOutput
,
char
*
interBuf
,
char
*
tsOutput
,
int
*
numOfOutput
,
short
otype
,
short
obytes
,
SUdfInit
*
buf
)
{
...
...
tests/script/sh/demo.c
浏览文件 @
04771a6d
...
...
@@ -17,7 +17,7 @@ typedef struct SDemo{
}
SDemo
;
#define FLOAT_NULL 0x7FF00000 // it is an NAN
#define DOUBLE_NULL 0x7FFFFF0000000000L // it is an NAN
#define DOUBLE_NULL 0x7FFFFF0000000000L
L
// it is an NAN
void
demo
(
char
*
data
,
short
itype
,
short
ibytes
,
int
numOfRows
,
long
long
*
ts
,
char
*
dataOutput
,
char
*
interBuf
,
char
*
tsOutput
,
...
...
tests/script/sh/deploy.bat
浏览文件 @
04771a6d
...
...
@@ -59,48 +59,29 @@ for /f "skip=1" %%A in (
'wmic computersystem get caption'
)
do
if
not
defined
fqdn
set
"fqdn=
%%A
"
echo
firstEp
%fqdn%
:7100
>
%TAOS_CFG%
echo
firstEp
%fqdn%
:7100
>>
%TAOS_CFG%
echo
secondEp
%fqdn%
:7200
>>
%TAOS_CFG%
echo
fqdn
%fqdn%
>>
%TAOS_CFG%
echo
serverPort
%NODE%
>>
%TAOS_CFG%
echo
supportVnodes
128
>>
%TAOS_CFG%
echo
dataDir
%DATA_DIR%
>>
%TAOS_CFG%
echo
logDir
%LOG_DIR%
>>
%TAOS_CFG%
echo
debugFlag
0
>>
%TAOS_CFG%
echo
mDebugFlag
135
>>
%TAOS_CFG%
echo
sdbDebugFlag
135
>>
%TAOS_CFG%
echo
dDebugFlag
135
>>
%TAOS_CFG%
echo
vDebugFlag
135
>>
%TAOS_CFG%
echo
tsdbDebugFlag
135
>>
%TAOS_CFG%
echo
cDebugFlag
135
>>
%TAOS_CFG%
echo
jnidebugFlag
135
>>
%TAOS_CFG%
echo
odbcdebugFlag
135
>>
%TAOS_CFG%
echo
httpDebugFlag
135
>>
%TAOS_CFG%
echo
monDebugFlag
135
>>
%TAOS_CFG%
echo
mqttDebugFlag
135
>>
%TAOS_CFG%
echo
qdebugFlag
135
>>
%TAOS_CFG%
echo
rpcDebugFlag
135
>>
%TAOS_CFG%
echo
mDebugFlag
143
>>
%TAOS_CFG%
echo
dDebugFlag
143
>>
%TAOS_CFG%
echo
vDebugFlag
143
>>
%TAOS_CFG%
echo
tqDebugFlag
143
>>
%TAOS_CFG%
echo
tsdbDebugFlag
143
>>
%TAOS_CFG%
echo
cDebugFlag
143
>>
%TAOS_CFG%
echo
jniDebugFlag
143
>>
%TAOS_CFG%
echo
qDebugFlag
143
>>
%TAOS_CFG%
echo
rpcDebugFlag
143
>>
%TAOS_CFG%
echo
tmrDebugFlag
131
>>
%TAOS_CFG%
echo
udebugFlag
135
>>
%TAOS_CFG%
echo
sdebugFlag
135
>>
%TAOS_CFG%
echo
wdebugFlag
135
>>
%TAOS_CFG%
echo
cqdebugFlag
135
>>
%TAOS_CFG%
echo
monitor
0
>>
%TAOS_CFG%
echo
monitorInterval
1
>>
%TAOS_CFG%
echo
http
0
>>
%TAOS_CFG%
echo
slaveQuery
0
>>
%TAOS_CFG%
echo
numOfThreadsPerCore
2
.0
>>
%TAOS_CFG%
echo
defaultPass
taosdata
>>
%TAOS_CFG%
echo
uDebugFlag
143
>>
%TAOS_CFG%
echo
sDebugFlag
143
>>
%TAOS_CFG%
echo
wDebugFlag
143
>>
%TAOS_CFG%
echo
numOfLogLines
20000000
>>
%TAOS_CFG%
echo
mnodeEqualVnodeNum
0
>>
%TAOS_CFG%
echo
balanceInterval
1
>>
%TAOS_CFG%
echo
clog
2
>>
%TAOS_CFG%
echo
days
10
>>
%TAOS_CFG%
echo
statusInterval
1
>>
%TAOS_CFG%
echo
maxVgroupsPerDb
4
>>
%TAOS_CFG%
echo
minTablesPerVnode
4
>>
%TAOS_CFG%
echo
maxTablesPerVnode
1000
>>
%TAOS_CFG%
echo
tableIncStepPerVnode
10000
>>
%TAOS_CFG%
echo
asyncLog
0
>>
%TAOS_CFG%
echo
numOfMnodes
1
>>
%TAOS_CFG%
echo
locale
en_US
.UTF
-
8
>>
%TAOS_CFG%
echo
fsync
0
>>
%TAOS_CFG%
echo
telemetryReporting
0
>>
%TAOS_CFG%
tests/script/sh/exec.bat
浏览文件 @
04771a6d
...
...
@@ -30,9 +30,28 @@ rem echo CFG_DIR: %CFG_DIR%
set
TAOS_CFG
=
%CFG_DIR%
taos
.cfg
rem echo TAOS_CFG: %TAOS_CFG%
set
LOG_DIR
=
%NODE_DIR%
log
\
rem echo LOG_DIR: %LOG_DIR%
set
TAOS_LOG
=
%LOG_DIR%
taosdlog
.0
rem echo TAOS_LOG: %TAOS_LOG%
if
%EXEC_OPTON%
==
start
(
rm
-rf
%TAOS_LOG%
echo
start
%TAOSD%
-c
%CFG_DIR%
start
%TAOSD%
-c
%CFG_DIR%
set
/a
check_num
=
0
:check
_online
sleep
1
set
/a
check_num
=
check_num
+
1
if
"
%check_num%
"
==
"11"
(
echo
check
online
out
time
.
goto
:finish
)
echo
check
taosd
online
tail
-n
+
0
%TAOS_LOG%
|
grep
-q
"TDengine initialized successfully"
||
goto
:check
_online
echo
finish
goto
:finish
)
if
%EXEC_OPTON%
==
stop
(
...
...
@@ -44,5 +63,8 @@ if %EXEC_OPTON% == stop (
)
do
(
rem echo taskkill /IM %%A
taskkill
/IM
%%A
>
NUL
2
>&
1
goto
:finish
)
)
:finish
\ No newline at end of file
tests/script/sh/sum_double.c
浏览文件 @
04771a6d
...
...
@@ -10,7 +10,7 @@ typedef struct SUdfInit{
int
const_item
;
/* 0 if result is independent of arguments */
}
SUdfInit
;
#define TSDB_DATA_INT_NULL 0x80000000L
#define TSDB_DATA_INT_NULL 0x80000000L
L
void
sum_double
(
char
*
data
,
short
itype
,
short
ibytes
,
int
numOfRows
,
long
long
*
ts
,
char
*
dataOutput
,
char
*
interBuf
,
char
*
tsOutput
,
...
...
tests/script/tsim/db/alter_option.sim
浏览文件 @
04771a6d
...
...
@@ -43,8 +43,16 @@ print ===> $data20 $data21 $data22 $data23 $data24 $data25
if $data00 != 1 then
return -1
endi
if $data01 != localhost:7100 then
return -1
system_content printf %OS%
if $system_content == Windows_NT then
system_content printf %COMPUTERNAME%:7100
if $data01 != $system_content then
return -1
endi
else
if $data01 != localhost:7100 then
return -1
endi
endi
if $data04 != ready then
goto check_dnode_ready_1
...
...
tests/script/tsim/db/create_all_options.sim
浏览文件 @
04771a6d
...
...
@@ -43,8 +43,16 @@ print ===> $data20 $data21 $data22 $data23 $data24 $data25
if $data00 != 1 then
return -1
endi
if $data01 != localhost:7100 then
return -1
system_content printf %OS%
if $system_content == Windows_NT then
system_content printf %COMPUTERNAME%:7100
if $data01 != $system_content then
return -1
endi
else
if $data01 != localhost:7100 then
return -1
endi
endi
if $data04 != ready then
goto check_dnode_ready_1
...
...
tests/script/tsim/trans/create_db.sim
浏览文件 @
04771a6d
...
...
@@ -96,50 +96,53 @@ sql_error create database d1 vgroups 2;
print =============== kill dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT
print =============== create database
sql show transactions
if $rows != 0 then
return -1
endi
sql_error create database d2 vgroups 2;
print =============== show transactions
sql show transactions
if $rows != 1 then
return -1
endi
if $data[0][0] != 8 then
return -1
endi
if $data[0][2] != redoAction then
return -1
endi
if $data[0][3] != d2 then
return -1
endi
sql show databases ;
if $rows != 4 then
return -1
endi
print d2 ==> $data(d2)[19]
if $data(d2)[19] != creating then
return -1
endi
sql_error create database d2 vgroups 2;
print =============== kill transaction
sql kill transaction 8;
sleep 2000
sql show transactions
if $rows != 0 then
return -1
system_content printf %OS%
if $system_content != Windows_NT then
print =============== create database
sql show transactions
if $rows != 0 then
return -1
endi
sql_error create database d2 vgroups 2;
print =============== show transactions
sql show transactions
if $rows != 1 then
return -1
endi
if $data[0][0] != 8 then
return -1
endi
if $data[0][2] != redoAction then
return -1
endi
if $data[0][3] != d2 then
return -1
endi
sql show databases ;
if $rows != 4 then
return -1
endi
print d2 ==> $data(d2)[19]
if $data(d2)[19] != creating then
return -1
endi
sql_error create database d2 vgroups 2;
print =============== kill transaction
sql kill transaction 8;
sleep 2000
sql show transactions
if $rows != 0 then
return -1
endi
endi
print =============== start dnode2
...
...
@@ -153,25 +156,25 @@ step3:
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
if $rows != 2 then
return -1
endi
if $data(1)[4] != ready then
goto step3
endi
if $data(2)[4] != ready then
goto step3
endi
sql show dnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
if $rows != 2 then
return -1
endi
if $data(1)[4] != ready then
goto step3
endi
if $data(2)[4] != ready then
goto step3
endi
sql show transactions
if $rows != 0 then
return -1
endi
sql drop database d2;
sql drop database
if exists
d2;
sql show transactions
if $rows != 0 then
...
...
tests/script/wtest.bat
浏览文件 @
04771a6d
...
...
@@ -52,6 +52,7 @@ echo wal 0 >> %TAOS_CFG%
echo
asyncLog
0
>>
%TAOS_CFG%
echo
locale
en_US
.UTF
-
8
>>
%TAOS_CFG%
echo
enableCoreFile
1
>>
%TAOS_CFG%
echo
charset
cp65001
>>
%TAOS_CFG%
set
"FILE_NAME=testSuite.sim"
if
"
%
1"
==
"-f"
set
"FILE_NAME=
%
2"
...
...
tests/tsim/src/simExe.c
浏览文件 @
04771a6d
...
...
@@ -39,13 +39,26 @@ void simLogSql(char *sql, bool useSharp) {
char
*
simParseArbitratorName
(
char
*
varName
)
{
static
char
hostName
[
140
];
#ifdef WINDOWS
taosGetFqdn
(
hostName
);
sprintf
(
&
hostName
[
strlen
(
hostName
)],
":%d"
,
8000
);
#else
sprintf
(
hostName
,
"%s:%d"
,
"localhost"
,
8000
);
#endif
return
hostName
;
}
char
*
simParseHostName
(
char
*
varName
)
{
static
char
hostName
[
140
];
#ifdef WINDOWS
hostName
[
0
]
=
'\"'
;
taosGetFqdn
(
&
hostName
[
1
]);
int
strEndIndex
=
strlen
(
hostName
);
hostName
[
strEndIndex
]
=
'\"'
;
hostName
[
strEndIndex
+
1
]
=
'\0'
;
#else
sprintf
(
hostName
,
"%s"
,
"localhost"
);
#endif
return
hostName
;
}
...
...
@@ -399,7 +412,8 @@ bool simExecuteSystemCmd(SScript *script, char *option) {
sprintf
(
buf
,
"cd %s; "
,
simScriptDir
);
simVisuallizeOption
(
script
,
option
,
buf
+
strlen
(
buf
));
#else
sprintf
(
buf
,
"%s%s"
,
simScriptDir
,
option
);
sprintf
(
buf
,
"%s"
,
simScriptDir
);
simVisuallizeOption
(
script
,
option
,
buf
+
strlen
(
buf
));
simReplaceStr
(
buf
,
".sh"
,
".bat"
);
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录