Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
9eada510
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9eada510
编写于
10月 14, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libpq connection_timeout doesn't do subsecond timing, so make the code
clear on that point.
上级
8f2a289d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
14 deletion
+10
-14
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+3
-5
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-misc.c
+5
-7
src/interfaces/libpq/libpq-int.h
src/interfaces/libpq/libpq-int.h
+2
-2
未找到文件。
src/interfaces/libpq/fe-connect.c
浏览文件 @
9eada510
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20
8 2002/10/11 04:41:59
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.20
9 2002/10/14 17:15:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1071,15 +1071,14 @@ connectDBComplete(PGconn *conn)
conn
->
status
=
CONNECTION_BAD
;
return
0
;
}
remains
.
tv_usec
=
0
;
remains
.
tv_usec
=
0
;
/* We don't use subsecond timing */
rp
=
&
remains
;
/* calculate the finish time based on start + timeout */
finish_time
=
time
((
time_t
*
)
NULL
)
+
remains
.
tv_sec
;
}
while
(
rp
==
NULL
||
remains
.
tv_sec
>
0
||
(
remains
.
tv_sec
==
0
&&
remains
.
tv_usec
>
0
))
while
(
rp
==
NULL
||
remains
.
tv_sec
>
0
)
{
/*
* Wait, if necessary. Note that the initial state (just after
...
...
@@ -1133,7 +1132,6 @@ connectDBComplete(PGconn *conn)
}
remains
.
tv_sec
=
finish_time
-
current_time
;
remains
.
tv_usec
=
0
;
}
}
conn
->
status
=
CONNECTION_BAD
;
...
...
src/interfaces/libpq/fe-misc.c
浏览文件 @
9eada510
...
...
@@ -25,7 +25,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.8
0 2002/10/03 17:09:42
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.8
1 2002/10/14 17:15:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -783,14 +783,13 @@ pqWait(int forRead, int forWrite, PGconn *conn)
}
int
pqWaitTimed
(
int
forRead
,
int
forWrite
,
PGconn
*
conn
,
const
struct
timeval
*
timeout
)
pqWaitTimed
(
int
forRead
,
int
forWrite
,
PGconn
*
conn
,
const
struct
timeval
*
timeout
)
{
fd_set
input_mask
;
fd_set
output_mask
;
fd_set
except_mask
;
struct
timeval
tmp_timeout
;
struct
timeval
*
ptmp_timeout
=
NULL
;
if
(
conn
->
sock
<
0
)
{
...
...
@@ -823,14 +822,13 @@ retry5:
if
(
NULL
!=
timeout
)
{
/*
*
select may modify timeout argument on some platforms use
* copy
*
select() may modify timeout argument on some platforms so
*
use
copy
*/
tmp_timeout
=
*
timeout
;
ptmp_timeout
=
&
tmp_timeout
;
}
if
(
select
(
conn
->
sock
+
1
,
&
input_mask
,
&
output_mask
,
&
except_mask
,
p
tmp_timeout
)
<
0
)
&
except_mask
,
&
tmp_timeout
)
<
0
)
{
if
(
SOCK_ERRNO
==
EINTR
)
goto
retry5
;
...
...
src/interfaces/libpq/libpq-int.h
浏览文件 @
9eada510
...
...
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-int.h,v 1.5
8 2002/10/03 17:09:42
momjian Exp $
* $Id: libpq-int.h,v 1.5
9 2002/10/14 17:15:11
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -340,7 +340,7 @@ extern int pqReadData(PGconn *conn);
extern
int
pqFlush
(
PGconn
*
conn
);
extern
int
pqSendSome
(
PGconn
*
conn
);
extern
int
pqWait
(
int
forRead
,
int
forWrite
,
PGconn
*
conn
);
extern
int
pqWaitTimed
(
int
forRead
,
int
forWrite
,
PGconn
*
conn
,
const
struct
timeval
*
timeout
);
extern
int
pqWaitTimed
(
int
forRead
,
int
forWrite
,
PGconn
*
conn
,
const
struct
timeval
*
timeout
);
extern
int
pqReadReady
(
PGconn
*
conn
);
extern
int
pqWriteReady
(
PGconn
*
conn
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录