Details
Description
Anu and Selva have seen cases of this and we suspect that the problem has to do with the way the UDR server handles return codes from CLI calls it makes. Stored procedures can contain SQL and produce result sets. As part of this, the UDR server makes CLI calls. Right now, it maps any non-zero return codes to internal errors. That is not quite right, warnings should either be returned to the user or ignored, whichever is more appropriate.
Selva also found that in some cases we do sequences of CLI calls, and if we encounter a warning in an earlier CLI calls, the later ones may return that warning code if the diagnostics aren't cleared in-between. The UDR server often does not clear the diags area, so it may see this issue.
The fix for these symptoms is to raise an internal error only for true errors in CLI calls, not for warnings. This applies to code in the UDR server, files in core/sql/udrserv.