Fix memory bug within cdbdisp_get_PQerror
cdbdisp_get_PQerror create a new error data object and initialize it with filename, function values from QE, errdata need a const filename, function, it does not copy it in ErrorContext. The problem is filename and function was point to a unstable memory, so when edata is used later, it may report a SIGSEGV. To resolve this, copy them in the transaction context because this error data can only be used inside current transaction.
Showing
想要评论请 注册 或 登录