Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7914dee

Browse files
author
Dave Cramer
committed
fixed bug in segfault REVOKE statement
1 parentfeac336 commit7914dee

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.298 2004/10/18 13:36:23 meskes Exp $*/
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.299 2004/11/01 13:17:12 davec Exp $*/
22

33
/* Copyright comment*/
44
%{
@@ -208,10 +208,16 @@ static char *
208208
adjust_informix(structarguments *list)
209209
{
210210
/* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
211+
* for instance you can declare variables in a function, and then subsequently use them
212+
* {
213+
* declare_vars();
214+
* exec sql ... which uses vars declared in the above function
215+
*
211216
* This breaks standard and leads to some very dangerous programming.
212217
* Since they do, we have to work around and accept their syntax as well.
213218
* But we will do so ONLY in Informix mode.
214-
* We have to change the variables to our own struct and just store the pointer instead of the variable*/
219+
* We have to change the variables to our own struct and just store the pointer instead of the variable
220+
*/
215221

216222
structarguments *ptr;
217223
char *result =make_str("");
@@ -2100,7 +2106,7 @@ GrantStmt:GRANT privileges ON privilege_target TO grantee_list opt_grant_grant_
21002106

21012107
RevokeStmt:REVOKEopt_revoke_grant_optionprivilegesONprivilege_targetFROMgrantee_listopt_drop_behavior
21022108
{
2103-
$$ = cat_str(9, make_str("revoke"),$2,$3, make_str("on"),$5, make_str("from"),$7,$8);
2109+
$$ = cat_str(8, make_str("revoke"),$2,$3, make_str("on"),$5, make_str("from"),$7,$8);
21042110
}
21052111

21062112
;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp