Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
哥们要飞
TDengine
提交
b8e60b79
T
TDengine
项目概览
哥们要飞
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b8e60b79
编写于
11月 03, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1894
上级
a1f2ad0d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
19 deletion
+17
-19
src/wal/inc/walInt.h
src/wal/inc/walInt.h
+1
-0
src/wal/src/walMgmt.c
src/wal/src/walMgmt.c
+1
-3
tests/script/general/insert/basic.sim
tests/script/general/insert/basic.sim
+15
-16
未找到文件。
src/wal/inc/walInt.h
浏览文件 @
b8e60b79
...
@@ -50,6 +50,7 @@ typedef struct {
...
@@ -50,6 +50,7 @@ typedef struct {
int32_t
fsyncPeriod
;
int32_t
fsyncPeriod
;
int32_t
fsyncSeq
;
int32_t
fsyncSeq
;
int8_t
stop
;
int8_t
stop
;
int8_t
reserved
[
3
];
char
path
[
WAL_PATH_LEN
];
char
path
[
WAL_PATH_LEN
];
char
name
[
WAL_FILE_LEN
];
char
name
[
WAL_FILE_LEN
];
pthread_mutex_t
mutex
;
pthread_mutex_t
mutex
;
...
...
src/wal/src/walMgmt.c
浏览文件 @
b8e60b79
...
@@ -133,9 +133,7 @@ void walClose(void *handle) {
...
@@ -133,9 +133,7 @@ void walClose(void *handle) {
while
(
walGetNextFile
(
pWal
,
&
fileId
)
>=
0
)
{
while
(
walGetNextFile
(
pWal
,
&
fileId
)
>=
0
)
{
snprintf
(
pWal
->
name
,
sizeof
(
pWal
->
name
),
"%s/%s%"
PRId64
,
pWal
->
path
,
WAL_PREFIX
,
fileId
);
snprintf
(
pWal
->
name
,
sizeof
(
pWal
->
name
),
"%s/%s%"
PRId64
,
pWal
->
path
,
WAL_PREFIX
,
fileId
);
if
(
fileId
==
pWal
->
fileId
)
{
if
(
remove
(
pWal
->
name
)
<
0
)
{
wDebug
(
"vgId:%d, wal:%p file:%s, it is closed and kept"
,
pWal
->
vgId
,
pWal
,
pWal
->
name
);
}
else
if
(
remove
(
pWal
->
name
)
<
0
)
{
wError
(
"vgId:%d, wal:%p file:%s, failed to remove"
,
pWal
->
vgId
,
pWal
,
pWal
->
name
);
wError
(
"vgId:%d, wal:%p file:%s, failed to remove"
,
pWal
->
vgId
,
pWal
,
pWal
->
name
);
}
else
{
}
else
{
wDebug
(
"vgId:%d, wal:%p file:%s, it is removed"
,
pWal
->
vgId
,
pWal
,
pWal
->
name
);
wDebug
(
"vgId:%d, wal:%p file:%s, it is removed"
,
pWal
->
vgId
,
pWal
,
pWal
->
name
);
...
...
tests/script/general/insert/basic.sim
浏览文件 @
b8e60b79
...
@@ -8,8 +8,8 @@ sleep 3000
...
@@ -8,8 +8,8 @@ sleep 3000
sql connect
sql connect
$i = 0
$i = 0
$dbPrefix =
tb_in_db
$dbPrefix =
d
$tbPrefix = t
b_in_tb
$tbPrefix = t
$db = $dbPrefix . $i
$db = $dbPrefix . $i
$tb = $tbPrefix . $i
$tb = $tbPrefix . $i
...
@@ -22,28 +22,27 @@ sql create table $tb (ts timestamp, speed int)
...
@@ -22,28 +22,27 @@ sql create table $tb (ts timestamp, speed int)
$x = 0
$x = 0
while $x < 10
while $x < 10
$ms = $x . m
$cc = $x * 60000
sql insert into $tb values (now + $ms , $x )
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , $x )
$x = $x + 1
$x = $x + 1
endw
endw
print =============== step 2
print =============== step 2
sql insert into $tb values (now - 5m , 10)
$x = 0
sql insert into $tb values (now - 6m , 10)
while $x < 5
sql insert into $tb values (now - 7m , 10)
$cc = $x * 60000
sql insert into $tb values (now - 8m , 10)
$ms = 1551481600000 + $cc
sql insert into $tb values ($ms , $x )
$x = $x + 1
endw
sql select * from $tb
sql select * from $tb
print $rows points data are retrieved
print $rows points data are retrieved
if $rows != 14 then
if $rows != 15 then
return -1
endi
sql drop database $db
sleep 1000
sql show databases
if $rows != 0 then
return -1
return -1
endi
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录