Article

Inactive Index gets compiled but gives error at runtime

Information

 
Article Number000083787
EnvironmentProduct : OpenEdge
Version : All supported versions
Platform: All supported platforms
Question/Problem Description
Inactive Index gets compiled but gives error at runtime.
A database is started with -noninactiveidx and has one inactive index.
A query is written, having USE-INDEX statement with the same inactive index.
While compiling the query no warning/error display on the screen, the query fails only while running.
The expectation is that the code should fail while compilation.
Steps to Reproduce1) Create sports database
2) Deactivate salesrep index on customer table
3) Start prowin session with -noinactiveidx parameter
4) Run query, it will compile fine but fails at runtime.

FOR EACH customer NO-LOCK USE-INDEX salesrep:
DISPLAY customer WITH 1 COL.
END.
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
This is expected behavior. The -noinactiveidx parameter tells the compiler not to use the inactive index when it evaluates the index to use for a query based on the WHERE expression and BY phrase. By specifying USE-INDEX the compiler does not need to select an index, as it has been provided one already. 
The USE-INDEX gives a very clear instruction to the compiler of which index to select because the application developer knows that this index provides the required sorting and bracketing. If the compiler was to ignore this, the resulting code would execute differently than the application developer intended. 
Resolution
It was determined that the Progress Product is functioning as designed.

An enhancement to the product can be requested through the Progress Community via an Ideas submission. Customer feedback is valuable and Idea submissions are monitored by our Product Management team. Enhancement requests are reviewed during the planning phase of each new product release and a list of the enhancements chosen for implementation can be found in the Release Notes documents that accompany each release. Once an Idea is submitted the Progress Software Community will have the opportunity to comment on and vote for the Idea.

For detailed information on how to submit an Idea, please refer to Knowledge Base article 000010839, "How to submit an idea for a Progress product enhancement".
Workaround
Notes
References to other documentation:

Progress article(s):
000010839, "How to submit an idea for a Progress product enhancement"
Attachment 
Last Modified Date10/4/2017 9:16 AM


Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025