Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/499#discussion_r64769047
--- Diff: core/sql/sqlcomp/nadefaults.cpp ---
@@ -6004,10 +6013,13 @@ enum DefaultConstants NADefaults::holdOrRestore
(const char *attrName,
char * value = NULL;
if (holdOrRestoreCQD == 1) // hold cqd
{
- if (heldDefaults_[attrEnum])
- {
- NADELETEBASIC(heldDefaults_[attrEnum], NADHEAP);
- }
+ if (heldHeldDefaults_[attrEnum])
+ {
+ // Gasp! We've done three successive HOLDs... it's off to
+ // the bit bucket for the deepest value
+ NADELETEBASIC(heldHeldDefaults_[attrEnum], NADHEAP);
--- End diff --
I considered this when developing the fix and decided against it. A person
can enter CQD HOLD commands at a sqlci prompt. With an assert, sqlci would
abend when a person did three such CQDs for the same default in succession.
Having user input cause an assert didn't seem good to me. Another possibility
is to raise an error or a warning. I will consider tihs for a later check-in.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---