--- sql/oracle/parser3oracle.C 2004/08/03 11:20:13 1.64 +++ sql/oracle/parser3oracle.C 2007/02/13 10:38:09 1.68 @@ -8,7 +8,7 @@ 2001.07.30 using Oracle 8.1.6 [@test tested with Oracle 7.x.x] */ -static const char *RCSId="$Id: parser3oracle.C,v 1.64 2004/08/03 11:20:13 paf Exp $"; +static const char *RCSId="$Id: parser3oracle.C,v 1.68 2007/02/13 10:38:09 misha Exp $"; #include "config_includes.h" @@ -113,6 +113,17 @@ static char *lsplit(char **string_ref, c return result; } +static char* rsplit(char* string, char delim) { + if(string) { + char* v=strrchr(string, delim); + if(v) { + *v=0; + return v+1; + } + } + return NULL; +} + #ifndef DOXYGEN struct Connection { SQL_Driver_services *services; @@ -275,7 +286,7 @@ public: *connection_ref=&connection; char *user=url; - char *service=lsplit(user, '@'); + char *service=rsplit(user, '@'); char *pwd=lsplit(user, ':'); char *options=lsplit(service, '?'); @@ -469,6 +480,9 @@ public: }; int binds_size=sizeof(Bind_info) * placeholders_count; + // we DO store OCIBind* into ATOMIC gc memory, + // but we do not allocate/free it, that's done automatically from oracle [using environment handles] + // so we don't have to bother with that Bind_info* binds=static_cast(services.malloc_atomic(binds_size)); { for(size_t i=0; i