Re: [Dovecot] Oracle SQL driver
You right. I've corrected the transaction handling mechanism. The only thing I couldn't understand: why rollback() shouldn't need to make real ROLLBACK? In case when whole transaction was failed succeded statements will remain uncommited. Then they will be commited later on next successful transaction. May be ROLLBACK is still needed?
The "VARCHAR sqltext[2048]" seems like an unnecessary restriction on the query length. Wasn't there a way to do this without the limit? Or in
AFAIK there is no possibility to use C types in PREPARE statement. Also Oracle cannot handle unsized VARCHARs. I've increased VARCHAR size to 65535.
test_connection() seems unnecessary.
Right you are.
=) Right.
driver_oracle_escape_string() really should be escaping the string.
I made this function to replace single quote in string with two single quotes. IMHO this should be enough. How do you think?
Yes. There are no other ways to work with untyped statements in OCI. But Oracle claims that all these statements shouldn't produce significant performance impact.
The new version attached.
On 6.1.2010, at 14.09, Alexander Bukharov wrote:
There wouldn't be any uncommitted statements. The only such statements are sent inside commit(), the others are SELECTs and such that don't modify anything.
Well, that also wastes memory :) I thought I remembered using VARCHAR pointers about 10 years ago. I think I still have that code around, but I currently don't have a computer where I could put that hard drive. Maybe in a few days.
Does Oracle handle \ specially? I don't have Oracle installed currently or access to any installations.
I'll check the updated patch later.
On Wed, 2010-01-06 at 15:09 +0300, Alexander Bukharov wrote:
AFAIK there is no possibility to use C types in PREPARE statement.
What about elsewhere? Looking at my old code I see for example:
int main(int argc, char *argv[]) .. EXEC SQL CONNECT :*argv;
So it looks like in at least some places copying to VARCHAR isn't necessary.
Ok. I'll fix in couple of days.
Alexander Bukharov
Timo Sirainen <tss@iki.fi> От: dovecot-bounces+bukharov=bpc.ru@dovecot.org 19.01.2010 16:27 Срок ответа для: Dovecot Mailing List <dovecot@dovecot.org>
Кому Alexander Bukharov <bukharov@bpc.ru> Копия Dovecot Mailing List <dovecot@dovecot.org> Тема Re: [Dovecot] Oracle SQL driver
On Wed, 2010-01-06 at 15:09 +0300, Alexander Bukharov wrote:
AFAIK there is no possibility to use C types in PREPARE statement.
What about elsewhere? Looking at my old code I see for example:
int main(int argc, char *argv[]) .. EXEC SQL CONNECT :*argv;
So it looks like in at least some places copying to VARCHAR isn't necessary.
participants (2)
-
Alexander Bukharov
-
Timo Sirainen