Sorry this has taken me a little while to respond, I've been under the gun a bit at work. This should work appropriately, I'm going to apply this patch in my test environment tomorrow morning and should have a go at it.
Geoff Harrison Director, Systems Engineering Match.com SN, LLC On Fri, Jul 16, 2010 at 4:41 AM, Simon Horman <ho...@verge.net.au> wrote: > On Wed, Jun 23, 2010 at 04:04:49PM +0900, Simon Horman wrote: > > [ Cced lvs-users and Geoff Harrison for comment ] > > Geoff, ping (I know its Friday :-) > > > On Mon, Jun 14, 2010 at 11:40:55AM +0100, Tim Pretlove wrote: > > > Hi Simon, > > > > > > Here is a patch for Oracle support. I've tried to make it as minor > > > as possible to avoid breaking the other database support. > > > > > > Regards > > > > > > > > > Tim > > > > > > > > > On 09/06/10 01:47, Simon Horman wrote: > > > >On Tue, Jun 08, 2010 at 09:28:45AM +0100, Tim Pretlove wrote: > > > >>Okay, I do currently have a version that works with oracle but I > > > >>wouldn't like to release it to the world until I have done some more > > > >>testing/tweeking. I have a few other type of database available > > > >>(Postgres and Mysql) so I will test it against them and make sure I > > > >>haven't broken anything. > > > > > > > >Thanks, let me know how it goes. > > > > > > -- > > > ____________________________________ > > > ( ) > > > ( Tim Pretlove ) > > > ( Computing Services ) > > > ( The University of Liverpool ) > > > ( Computer Laboratory, Brownlow Hill ) > > > ( Liverpool, L69 3BX ) > > > ( Email: t.pretl...@liverpool.ac.uk ) > > > ( Phone: 0151-794-4479 ) > > > ( ) > > > ------------------------------------ > > > o ,__, > > > o (00)____ > > > (__) )\ > > > ||--|| * > > > > > diff -r cbd80d4017c8 ldirectord/ldirectord.in > > > --- a/ldirectord/ldirectord.in Tue Jun 08 20:07:16 2010 +0200 > > > +++ b/ldirectord/ldirectord.in Mon Jun 14 11:36:32 2010 +0100 > > > @@ -3043,7 +3043,7 @@ > > > > > > sub check_oracle > > > { > > > - return check_sql(@_, "Oracle", ""); > > > + return check_sql(@_, "Oracle", "sid"); > > > } > > > > > > sub check_sql > > > @@ -3067,6 +3067,7 @@ > > > "host=$$r{server};port=$port", $$v{login}, > > > $$v{passwd}); > > > unless ($dbh) { > > > + &ld_debug(2, "Failed to bind to $$r{server} with > DBI->errstr\n"); > > > check_sql_log_errstr("Failed to bind to $$r{server} with", > > > DBI->errstr); > > > goto err_down; > > > @@ -3074,16 +3075,16 @@ > > > $result--; > > > $sth = $dbh->prepare($query); > > > unless ($sth) { > > > + &ld_debug(2, "Error preparing statement: $dbh->errstr\n"); > > > check_sql_log_errstr("Error preparing statement:", > > > $dbh->errstr); > > > goto err_disconect; > > > } > > > > > > - # On error "execute" will return undef. > > > - # Otherwise it will return either "0E0" > > > - # (Some garbage to make 0 true) or > 1. > > > + # Test to see if any errors are returned > > > $sth->execute; > > > - unless ($sth->rows) { > > > + if ($dbh->err) { > > > + &ld_debug(2, "Error executing statement: $dbh->errstr : > $dbh->err\n"); > > > check_sql_log_errstr("Error executing statement:", > > > $dbh->errstr, $dbh->err); > > > goto err_finish; > > > @@ -3104,8 +3105,10 @@ > > > # (enabled) that says whether or not you want to actually use this > > > # in the pool from ldirector / ipvs, and disable them without > > > # actually turning off your sql server. > > > - > > > - unless ($rows = $sth->execute) { > > > + > > > + $sth->execute; > > > + if ($dbd eq "Oracle") { $sth->fetchrow_hashref() } > > > + unless ($rows = $sth->rows) { > > > check_sql_log_errstr("Error executing statement:", > > > $dbh->errstr, $dbh->err); > > > goto err_finish; > > > > > > _______________________________________________ > > Please read the documentation before posting - it's available at: > > http://www.linuxvirtualserver.org/ > > > > LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org > > Send requests to lvs-users-requ...@linuxvirtualserver.org > > or go to http://lists.graemef.net/mailman/listinfo/lvs-users > _______________________________________________ Please read the documentation before posting - it's available at: http://www.linuxvirtualserver.org/ LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org Send requests to lvs-users-requ...@linuxvirtualserver.org or go to http://lists.graemef.net/mailman/listinfo/lvs-users