Project

General

Profile

Bug #7243

collision between YEAR function and a perm table abbreviated name

Added by Constantin Asofiei about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#2 Updated by Constantin Asofiei about 1 year ago

This test fails to convert:

def var ch as int.
form ch with frame f1.

display year(today)  with frame f1.

when there is a year1 table which can be abbreviated as year:
ADD TABLE "year1" 
  AREA "Schema Area" 
  DUMP-NAME "yc" 

ADD FIELD "f1" OF "year1" AS character 
  FORMAT "x(8)" 
  INITIAL "" 
  POSITION 2
  MAX-WIDTH 16
  ORDER 10

#3 Updated by Constantin Asofiei about 1 year ago

The patch for this seems to be:

===================================================================
--- old/6129c/src/com/goldencode/p2j/uast/progress.g
+++ new/src/com/goldencode/p2j/uast/progress.g
@@ -28075,7 +28083,7 @@
            // this must be first so that the reserved keywords can be matched with precedence
            space_or_skip { first = false; }

-         | { first && isTableName && (!isFieldName || !moreFollows) }?
+         | { first && isTableName && (!isFieldName || !moreFollows) && LA(2) != LPARENS }?
            record_spec[fields]
            { first = false; }

The idea is: in display_stmt, if there is a LPARENS following a possible table name, do not interpret it as a record_spec.

#4 Updated by Constantin Asofiei about 1 year ago

  • Assignee set to Constantin Asofiei
  • Status changed from New to WIP

#5 Updated by Constantin Asofiei about 1 year ago

  • Status changed from WIP to Review

The fix is in 7199b/14526.

#6 Updated by Greg Shah about 1 year ago

  • Status changed from Review to Test
  • % Done changed from 0 to 100

Code Review Task Branch 7199b Revision 14526

No objection.

#7 Updated by Constantin Asofiei about 1 year ago

7199b/14533 was merged to trunk rev 14528 and archived.

#8 Updated by Greg Shah about 1 year ago

  • Status changed from Test to Closed

Also available in: Atom PDF