summaryrefslogtreecommitdiff
blob: 6413bf77de3f8ab1026f302675b26ad1e6eeba2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
https://github.com/clementine-player/Clementine/issues/5297

--- src/core/database.cpp
+++ src/core/database.cpp
@@ -265,6 +265,16 @@
   StaticInit();
 
   {
+#ifdef SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER
+    QVariant v = db.driver()->handle();
+    if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*") == 0) {
+      sqlite3* handle = *static_cast<sqlite3**>(v.data());
+      if (handle) {
+        sqlite3_db_config(handle, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, NULL);
+      }
+    }
+#endif
+
     QSqlQuery set_fts_tokenizer("SELECT fts3_tokenizer(:name, :pointer)", db);
     set_fts_tokenizer.bindValue(":name", "unicode");
     set_fts_tokenizer.bindValue(