[banshee] configure: depend on sqlite3 >= 3.8.1 (bgo#740879)



commit c278de0a2259c7478734b961c5aca4a3ee395621
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Tue Oct 4 11:43:44 2016 +0800

    configure: depend on sqlite3 >= 3.8.1 (bgo#740879)
    
    According to Roderich Schup (see [1]), the version check in
    this commit from the master branch[2] was wrong.
    
    Anyway, these days sqlite3 versions in distributions are
    normally higher than 3.8.1 (e.g.: 3.11 in Ubuntu 16.04.1 LTS),
    so we can raise the version dependency in the configure phase
    to avoid the version check altogether, and just always use
    UNLIKELY under the hood.
    
    [1] https://bugzilla.gnome.org/show_bug.cgi?id=740879#c36
    [2] "Database: fix performance for the new SQLite's query planner (bgo#740879)"
    https://git.gnome.org/browse/banshee/commit/?id=fd3f08ec702f3a38918e0a96d2fc01d74af64ee4

 configure.ac                                       |    2 +-
 .../Banshee.Database/BansheeDbConnection.cs        |    9 ++-------
 2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5445980..8fc42da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,7 +114,7 @@ BANSHEE_CHECK_OSX
 dnl Mono.Upnp libraries
 BANSHEE_CHECK_MONO_UPNP
 
-PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.4)
+PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.8.1)
 
 dnl GNOME (optional)
 AC_ARG_ENABLE(gnome, AC_HELP_STRING([--disable-gnome], [Disable GNOME support]), , enable_gnome="yes")
diff --git a/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs 
b/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
index 4434eeb..37120f3 100644
--- a/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
+++ b/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
@@ -52,14 +52,9 @@ namespace Banshee.Database
             get { return configuration; }
         }
 
-        private bool? likelihood_support = null;
+        // banshee already depends on sqlite >= 3.8.1 (TODO: remove this internal property)
         internal bool LikelihoodSupport {
-            get {
-                if (!likelihood_support.HasValue) {
-                    likelihood_support = Query<bool> ("SELECT sqlite_version () >= '3.8.1'");
-                }
-                return likelihood_support.Value;
-            }
+            get { return true; }
         }
 
         public BansheeDbConnection () : this (DatabaseFile)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]