Consultor Eletrônico



Kbase P129358: SQL: SUBSTR / SUBSTRING function retains previous record value for all successive records
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   17/09/2009
Status: Verified

SYMPTOM(s):

SQL: SUBSTR / SUBSTRING function retains previous record value for all successive records

Using SUBSTR / SUBSTRING function in a SQL-92 query

Function retains previous record value for all successive records

The first non-blank column value of the SUBSTR function is propagated for subsequent record values even where the same column values are blank.

This issue is reproducible only when using a specific database table.

This issue is reproducible only if we load the offending table's .df into an empty database.

This issue cannot be reproduced if the offending table .df is loaded into an existing database

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.1x

CAUSE:

Bug# OE00165527

CAUSE:

The cause of this bug is the behavior of our substring implementation. If the substring's start character is greater that the length of the original string, substring is supposed to return a 0-length string. However, the 0-length string was not being null-terminated, meaning whatever was there already (basically meaningless data) was being returned. Often this meaningless data is the substring result from the last record, but not all the time, which is what makes this bug appear sometimes and not others.

FIX:

Upgrade to OpenEdge 10.1C01 or later