oracle / odpi

ODPI-C: Oracle Database Programming Interface for Drivers and Applications
https://oracle.github.io/odpi/
Other
264 stars 75 forks source link

Is DPI_TPC_END_SUSPEND an undocumented flag in the OCI manual? #176

Closed kubo closed 2 years ago

kubo commented 2 years ago

The third argument flags of dpiConn_tpcEnd is passed to the the third argument of OCITransDetach. (here and here)

The former must be DPI_TPC_END_NORMAL(0) or DPI_TPC_END_SUSPEND(0x00100000).

In the ODPI-C manual:

flags [IN] – one of the values from the enumeration dpiTpcEndFlags.

In dpi.h:

// two-phase commit (flags for dpiConn_tpcEnd())
typedef uint32_t dpiTpcEndFlags;
#define DPI_TPC_END_NORMAL                          0
#define DPI_TPC_END_SUSPEND                         0x00100000

On the other hand, the third argument of OCITransDetach must be OCI_DEFAULT(0) according to the OCI manual. There are no flags corresponding to DPI_TPC_END_SUSPEND. Is it an undocumented flag?

In the OCI manual:

flags (IN)

You must pass a value of OCI_DEFAULT for this parameter.

cjbj commented 2 years ago

I'll take a look when I'm back from vacation.

cjbj commented 2 years ago

When we did the TPC project we identified a few Oracle doc corrections. Mentioning OCI_TRANS_NOMIGRATE for OCITransDetach() was on the list. I'll chase up. Thanks for checking with us.

kubo commented 2 years ago

Thanks. I got it.