rlm_sql_oracle: OCI_COMMIT_ON_SUCCESS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

rlm_sql_oracle: OCI_COMMIT_ON_SUCCESS

George Chelidze-3
Hi guys,

rlm_sql/drivers/rlm_sql_oracle/rlm_sql_oracle.c:

    status = OCIStmtExecute(conn->ctx, conn->query, conn->error, 1, 0,
                            NULL, NULL, OCI_COMMIT_ON_SUCCESS);

Any reason for having OCI_COMMIT_ON_SUCCESS in OCIStmtExecute() call?

The problem is that any module (rlm_sqlippool is a good candidate)
relying on rlm_sql and using the concept of database transactions will
have no chance to rollback, neither it can provide any guarantee for
data consistency.

Kind regards,

George Chelidze

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: rlm_sql_oracle: OCI_COMMIT_ON_SUCCESS

arr2036

> On 17 Jul 2017, at 12:58, George Chelidze <[hidden email]> wrote:
>
> Hi guys,
>
> rlm_sql/drivers/rlm_sql_oracle/rlm_sql_oracle.c:
>
>    status = OCIStmtExecute(conn->ctx, conn->query, conn->error, 1, 0,
>                            NULL, NULL, OCI_COMMIT_ON_SUCCESS);
>
> Any reason for having OCI_COMMIT_ON_SUCCESS in OCIStmtExecute() call?
>
> The problem is that any module (rlm_sqlippool is a good candidate)
> relying on rlm_sql and using the concept of database transactions will
> have no chance to rollback, neither it can provide any guarantee for
> data consistency.

Feel free to open a pull request describing a bit more of the background around this.  I don’t believe anyone on the core team is familiar with Oracle internals, so we can’t help, but if you explain exactly why OCI_COMMIT_ON_SUCCESS is bad, then I don’t see why it can’t be changed.

-Arran
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: rlm_sql_oracle: OCI_COMMIT_ON_SUCCESS

George Chelidze-3
On 07/17/2017 10:01 PM, Arran Cudbard-Bell wrote:

>> On 17 Jul 2017, at 12:58, George Chelidze <[hidden email]> wrote:
>>
>> Hi guys,
>>
>> rlm_sql/drivers/rlm_sql_oracle/rlm_sql_oracle.c:
>>
>>    status = OCIStmtExecute(conn->ctx, conn->query, conn->error, 1, 0,
>>                            NULL, NULL, OCI_COMMIT_ON_SUCCESS);
>>
>> Any reason for having OCI_COMMIT_ON_SUCCESS in OCIStmtExecute() call?
>>
>> The problem is that any module (rlm_sqlippool is a good candidate)
>> relying on rlm_sql and using the concept of database transactions will
>> have no chance to rollback, neither it can provide any guarantee for
>> data consistency.
> Feel free to open a pull request describing a bit more of the background around this.  I don’t believe anyone on the core team is familiar with Oracle internals, so we can’t help, but if you explain exactly why OCI_COMMIT_ON_SUCCESS is bad, then I don’t see why it can’t be changed.
>
> -Arran
On my TODO list, thanks Arran.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Loading...