[X2Go-Commits] [x2goserver] 01/01: Only call $dbh->sqlite_busy_timeout() if the $dbh object is capable of that. Works around a too-old DBD::SQLite package on SLE 11.x.

git-admin at x2go.org git-admin at x2go.org
Wed Feb 4 22:21:51 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goserver.

commit 68b8861a6422cb5576a177eb8a131a7d1f434fd8
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Feb 4 22:18:28 2015 +0100

    Only call $dbh->sqlite_busy_timeout() if the $dbh object is capable of that. Works around a too-old DBD::SQLite package on SLE 11.x.
    
    Conflicts (resolved by Mike Gabriel):
    	X2Go/Server/DB/SQLite3.pm
---
 X2Go/Server/DB/SQLite3.pm |    7 ++++++-
 debian/changelog          |    2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/X2Go/Server/DB/SQLite3.pm b/X2Go/Server/DB/SQLite3.pm
index 65446ac..5e73e56 100644
--- a/X2Go/Server/DB/SQLite3.pm
+++ b/X2Go/Server/DB/SQLite3.pm
@@ -65,7 +65,12 @@ sub init_db
 	my ($uname, $pass, $uid, $pgid, $quota, $comment, $gcos, $homedir, $shell, $expire) = getpwnam($x2gouser);
 	my $dbfile="$homedir/x2go_sessions";
 	my $dbh=DBI->connect("dbi:SQLite:dbname=$dbfile","","",{sqlite_use_immediate_transaction => 1, AutoCommit => 1, }) or die $_;
-	$dbh->sqlite_busy_timeout( 2000 );
+
+	# on SLE 11.x the sqlite_busy_timeout function does not exist, trying to work around that...
+	if ( $dbh->can('sqlite_busy_timeout') )
+	{
+		$dbh->sqlite_busy_timeout( 2000 );
+	}
 	return $dbh;
 }
 
diff --git a/debian/changelog b/debian/changelog
index dac8754..3268e3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -218,6 +218,8 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium
     - Fix wrong evocation of x2gosyslog ("error" -> "err").
     - Use "undef $dbh" instead of "$dbh->disconnect()". Fixes SQLite3 issues on
       SLE 11.x.
+    - Only call $dbh->sqlite_busy_timeout() if the $dbh object is capable of
+      that. Works around a too-old DBD::SQLite package on SLE 11.x.
   * debian/control:
     + Add D (x2goserver): libfile-which-perl.
     + Add C (x2goserver: x2godesktopsharing (<< 3.1.1.2-0~). (Fixes: #700).

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list