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

Commit06e3d84

Browse files
author
Michael Meskes
committed
Fixed variable handling in preproc.y.
1 parentf6f8c33 commit06e3d84

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,5 +1055,9 @@ Wed Jan 31 17:11:04 CET 2001
10551055
Mon Feb 19 08:25:14 CET 2001
10561056

10571057
- Synced gram.y and preproc.y.
1058+
1059+
Mon Feb 26 15:22:04 CET 2001
1060+
1061+
- Fixed misplaced variables FoundInto and QueryIsRule.
10581062
- Set ecpg version to 2.8.0.
10591063
- Set library version to 3.2.0.

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,12 +1247,13 @@ OptInherit: INHERITS '(' relation_name_list ')' { $$ = cat_str(3
12471247
* SELECT ... INTO.
12481248
*/
12491249

1250-
CreateAsStmt:CREATEOptTempTABLErelation_nameOptCreateAsASSelectStmt
1250+
CreateAsStmt:CREATEOptTempTABLErelation_nameOptCreateAsAS
1251+
{ FoundInto =0; }SelectStmt
12511252
{
12521253
if (FoundInto ==1)
12531254
mmerror(ET_ERROR,"CREATE TABLE/AS SELECT may not specify INTO");
12541255

1255-
$$ = cat_str(7, make_str("create"),$2, make_str("table"),$4,$5, make_str("as"),$7);
1256+
$$ = cat_str(7, make_str("create"),$2, make_str("table"),$4,$5, make_str("as"),$8);
12561257
}
12571258
;
12581259

@@ -2042,6 +2043,7 @@ RuleStmt: CREATE RULE name AS
20422043
ONeventTOevent_objectwhere_clause
20432044
DOopt_insteadRuleActionList
20442045
{
2046+
QueryIsRule=0;
20452047
$$ = cat_str(10, make_str("create rule"),$3, make_str("as on"),$7, make_str("to"),$9,$10, make_str("do"),$12,$13);
20462048
}
20472049
;
@@ -2510,7 +2512,6 @@ select_no_parens: simple_select
25102512

25112513
select_clause:simple_select
25122514
{
2513-
FoundInto =0;
25142515
$$ =$1;
25152516

25162517
}
@@ -3808,17 +3809,17 @@ ColLabel: ECPGLabelTypeName{ $$ = $1; }
38083809

38093810
SpecialRuleRelation:OLD
38103811
{
3811-
if (QueryIsRule)
3812-
$$ = make_str("old");
3813-
else
3812+
if (!QueryIsRule)
38143813
mmerror(ET_ERROR,"OLD used in non-rule query");
3814+
3815+
$$ = make_str("old");
38153816
}
38163817
|NEW
38173818
{
3818-
if (QueryIsRule)
3819-
$$ = make_str("new");
3820-
else
3819+
if (!QueryIsRule)
38213820
mmerror(ET_ERROR,"NEW used in non-rule query");
3821+
3822+
$$ = make_str("new");
38223823
}
38233824
;
38243825

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp