Github user anoopsharma00 commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1677#discussion_r207433722
--- Diff: core/sql/exp/exp_function.cpp ---
@@ -786,13 +786,18 @@ ExpRaiseErrorFunction::ExpRaiseErrorFunction
(Attributes **attr,
NABoolean raiseError,
const char *constraintName,
const char *tableName,
- const NABoolean hasStringExp)
// -- Triggers
+ const NABoolean
hasStringExp, // -- Triggers
+ const char * optionalStr)
: ex_function_clause (ITM_RAISE_ERROR, (hasStringExp ? 2 : 1), attr,
space),
- theSQLCODE_(sqlCode),
- constraintName_((char *)constraintName),
- tableName_((char *)tableName)
+ theSQLCODE_(sqlCode),
+ constraintName_((char *)constraintName),
+ tableName_((char *)tableName)
{
- setRaiseError(raiseError);
+ setRaiseError(raiseError);
+
+
+ strncpy(optionalStr_, optionalStr, MAX_OPTIONAL_STR_LEN);
--- End diff --
thanks, good catch. this showed up during regr failures as well.
It is fixed.
---