Closed stampy88 closed 5 years ago
@mattn Seems fine with me.
@mattn Side note, looks like wnameless/oracle-xe-11g was removed. I assume Oracle is going after sites and removing these images?
It looks like there may be more cases where this fails too. I am going to include them as well in few minutes.
@mattn I think this brings up a bigger question: is there anytime where you would want OCI_SUCCESS_WITH_INFO
to be handled as an error and not success? Looking through the code base there are lots of checks for OCI_SUCCESS
.
Added checking in the OCI8DriverStruct.Open
as well, and that got me working, e.g. selects, updates, inserts, deletes. My original question above still stands though. This may be something that should be tackled across the project.
@MichaelS11
Side note, looks like wnameless/oracle-xe-11g was removed. I assume Oracle is going after sites and removing these images?
Hmm, I have no idea. :(
I think this brings up a bigger question: is there anytime where you would want OCI_SUCCESS_WITH_INFO to be handled as an error and not success? Looking through the code base there are lots of checks for OCI_SUCCESS.
Yes, I think so.
I probably would not add OCI_SUCCESS_WITH_INFO to everything. Honestly would really like to understand more why it is happening for the 3 locations so far in this PR.
That being said, I am fine with changing the 3 locations to have OCI_SUCCESS_WITH_INFO, just would not add any more at this time.
@MichaelS11 I was hoping you guys could give a better idea why it is only needed in those 3 places. And honestly, it is only needed in 2 of the 3 since this is always true
https://github.com/mattn/go-oci8/blob/master/oci8.go#L245
I won't add anymore, so merge away if you guys are happy.
@MichaelS11 any more thoughts on this?
Was curious, do you know of any test cases for these?
The way I happened to see this was that we spun up a new DB, but that password was set to expire after a certain period. Once we got close to the expiration date, a warning started coming back and the code wasn't handling it.
Ah, I see now. Got it.
@mattn Looks good to me.
Thank you