Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1677#discussion_r207411473 --- 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 -- This will abend if "optionalStr" is null
---