ydb_message() and ydb_message_t() return YDB_ERR_PARMINVALID when second parameter is NULL
Final Release Note
If the *msg_buff
parameter is NULL, ydb_message()
and ydb_message_t()
return YDB_ERR_PARAMINVALID. Previously, this would result in process termination with a segmentation fault. Additionally, YDB_ERR_INVSTRLEN errors returned by ydb_message()
and ydb_message_t()
result in a subsequent ydb_status()
returning the full YDB-E-INVSTRLEN error string. Previously, it returned an additional SYSTEM-W-UNKNOWN string. [#425 (closed)]
Description
A few issues were noticed in ydb_message().
-
If msg_buff parameter (second parameter) is passed in as NULL, ydb_message() terminates the process with a SIG-11 and accompanying core file. Instead it should issue a PARAMINVALID error.
-
If INVSTRLEN error is issued inside ydb_message(), an extraneous SYSTEM-W-UNKNOWN error is also returned when one does a ydb_zstatus() to obtain the error string.
Draft Release Note
ydb_message()
returns with a YDB_ERR_PARAMINVALID
error if the msg_buff parameter (2nd parameter) is passed in as NULL. Previously it would result in the process terminating with a SIG-11. Additionally, YDB_ERR_INVSTRLEN
error returns from ydb_message() now set the error status appropriately so a ydb_zstatus()
returns the full YDB-E-INVSTRLEN error string. Previously it used to incorrectly return an additional SYSTEM-W-UNKNOWN error string.