Inactive Index gets compiled but gives error at runtime


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.
Clarifying Information
Error Message
Defect/Enhancement Number
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. 
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".
References to other documentation:

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

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.

Was this article helpful?


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