[Bast-commits] r7052 -
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Tue Jul 14 23:39:02 GMT 2009
Author: caelum
Date: 2009-07-14 23:39:02 +0000 (Tue, 14 Jul 2009)
New Revision: 7052
Modified:
DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
Log:
set maxConnect in DSN and add docs
Modified: DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm
===================================================================
--- DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-07-14 22:14:09 UTC (rev 7051)
+++ DBIx-Class/0.08/branches/sybase/lib/DBIx/Class/Storage/DBI/Sybase.pm 2009-07-14 23:39:02 UTC (rev 7052)
@@ -65,10 +65,27 @@
bless $self, 'DBIx::Class::Storage::DBI::Sybase::NoBindVars';
$self->_rebless;
}
+ $self->_set_maxConnect;
}
}
}
+sub _set_maxConnect {
+ my $self = shift;
+
+ my $dsn = $self->_dbi_connect_info->[0];
+
+ return if ref($dsn) eq 'CODE';
+
+ if ($dsn !~ /maxConnect=/) {
+ $self->_dbi_connect_info->[0] = "$dsn;maxConnect=256";
+ # will take effect next connection
+ my $connected = defined $self->_dbh;
+ $self->disconnect;
+ $self->ensure_connected if $connected;
+ }
+}
+
=head2 connect_call_blob_setup
Used as:
@@ -254,6 +271,20 @@
1;
+=head1 MAXIMUM CONNECTIONS
+
+L<DBD::Sybase> makes separate connections to the server for active statements in
+the background. By default the number of such connections is limited to 25, on
+both the client side and the server side.
+
+This is a bit too low, so on connection the clientside setting is set to C<256>
+(see L<DBD::Sybase/maxConnect>.) You can override it to whatever setting you
+like in the DSN.
+
+See
+L<http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sag1/html/sag1/sag1272.htm>
+for information on changing the setting on the server side.
+
=head1 DATES
See L</connect_call_datetime_setup> to setup date formats
More information about the Bast-commits
mailing list