Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
c959d370
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,发现更多精彩内容 >>
提交
c959d370
编写于
9月 12, 2005
作者:
M
Michael Meskes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed transaction command handling to not ignore savepoints and to correctly check for errors.
上级
4fe45635
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
15 deletion
+24
-15
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+6
-1
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/misc.c
+18
-14
未找到文件。
src/interfaces/ecpg/ChangeLog
浏览文件 @
c959d370
...
@@ -1933,8 +1933,13 @@ Thu Jun 2 14:22:32 CEST 2005
...
@@ -1933,8 +1933,13 @@ Thu Jun 2 14:22:32 CEST 2005
Wed Aug 24 12:17:48 CEST 2005
Wed Aug 24 12:17:48 CEST 2005
- Check for NULL before checking whether argument is an array.
- Check for NULL before checking whether argument is an array.
- Remove
d
stray character from string quoting.
- Remove stray character from string quoting.
- Fixed check to report missing varchar pointer implementation.
- Fixed check to report missing varchar pointer implementation.
Mon Sep 12 13:53:35 CEST 2005
- Fixed transaction command handling to not ignore savepoints
and to correctly check for errors.
- Set ecpg library version to 5.1.
- Set ecpg library version to 5.1.
- Set ecpg version to 4.1.1.
- Set ecpg version to 4.1.1.
src/interfaces/ecpg/ecpglib/misc.c
浏览文件 @
c959d370
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.2
4 2004/10/14 20:23:46 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.2
5 2005/09/12 11:57:53 meskes
Exp $ */
#define POSTGRES_ECPG_INTERNAL
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
#include "postgres_fe.h"
...
@@ -186,31 +186,35 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
...
@@ -186,31 +186,35 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction)
/* if we have no connection we just simulate the command */
/* if we have no connection we just simulate the command */
if
(
con
&&
con
->
connection
)
if
(
con
&&
con
->
connection
)
{
{
/*
/* If we got a transaction command but have no open transaction,
* if we are not in autocommit mode, already have committed the
* we have to start one, unless we are in autocommit, where the
* transaction and get another commit, just ignore it
* developers have to take care themselves.
* However, if the command is a begin statement, we just execute it once.
*/
*/
if
(
!
con
->
committed
||
con
->
autocommit
)
if
(
con
->
committed
&&
!
con
->
autocommit
&&
strncmp
(
transaction
,
"begin"
,
5
)
!=
0
&&
strncmp
(
transaction
,
"start"
,
5
)
!=
0
)
{
{
if
((
res
=
PQexec
(
con
->
connection
,
transaction
))
==
NULL
)
res
=
PQexec
(
con
->
connection
,
"begin transaction"
);
if
(
res
==
NULL
||
PQresultStatus
(
res
)
!=
PGRES_COMMAND_OK
)
{
{
ECPGraise
(
lineno
,
ECPG_TRANS
,
ECPG_SQLSTATE_TRANSACTION_RESOLUTION_UNKNOWN
,
NULL
);
ECPGraise
(
lineno
,
ECPG_TRANS
,
ECPG_SQLSTATE_TRANSACTION_RESOLUTION_UNKNOWN
,
NULL
);
return
FALSE
;
return
FALSE
;
}
}
PQclear
(
res
);
PQclear
(
res
);
}
}
res
=
PQexec
(
con
->
connection
,
transaction
);
if
(
res
==
NULL
||
PQresultStatus
(
res
)
!=
PGRES_COMMAND_OK
)
{
ECPGraise
(
lineno
,
ECPG_TRANS
,
ECPG_SQLSTATE_TRANSACTION_RESOLUTION_UNKNOWN
,
NULL
);
return
FALSE
;
}
PQclear
(
res
);
}
}
if
(
strcmp
(
transaction
,
"commit"
)
==
0
||
strcmp
(
transaction
,
"rollback"
)
==
0
)
if
(
strcmp
(
transaction
,
"commit"
)
==
0
||
strcmp
(
transaction
,
"rollback"
)
==
0
)
{
con
->
committed
=
true
;
con
->
committed
=
true
;
else
#if 0
con
->
committed
=
false
;
/* deallocate all prepared statements */
if (!ECPGdeallocate_all(lineno))
return false;
#endif
}
return
true
;
return
true
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录