]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
new config option to disable "SET NAMES UTF8" sql call
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 20 Feb 2010 11:23:07 +0000 (11:23 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 20 Feb 2010 11:23:07 +0000 (11:23 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@671 b3834d28-1941-0410-a4f8-b48e95affb8f

data/config.default.php
doc/ChangeLog
src/SemanticScuttle/Service/Factory.php

index 1b040c001185bf246bee01f5ee2a28e3ee4fe16c..fdbdaeeb794b8144ab9ab8f9317a12c46e6fe212 100644 (file)
@@ -180,6 +180,15 @@ $dbname = 'scuttle';
  */
 $tableprefix = 'sc_';
 
+/*
+ * If the database needs to be switched to UTF8
+ * manually or not. If true, a "SET NAMES UTF8" query
+ * will be sent at the beginning. If you need performance,
+ * save this query and set it in your mysql server options.
+ *
+ * @var boolean
+ */
+$dbneedssetnames = true;
 
 
 /***************************************************
index c797f5610f7c3efbc2bc8338de8daeca79994aca..05757ace1e3517713976940ac1a596cb3cc00432 100644 (file)
@@ -1,10 +1,17 @@
 ChangeLog for SemantiScuttle
 ============================
 
+0.97.0 - 2010-?????
+-------------------
+- Many SQL optimizations
+- New config option to skip "SET NAMES UTF8" call: $dbneedssetnames
+
+
 0.96.1 - 2010-02-09
 -------------------
 - Fix bug #2948410: API is broken in 0.96.0
 
+
 0.96.0 - 2010-02-08
 -------------------
 - Fix bug #2843523: ArtViper thumbnail license change
index 9b79e6c7c89f4b6e2ad08a171d27e5b69e973aed..d7ff1d4da873f8ff68fc9f630f2f953d480a55be 100644 (file)
@@ -113,7 +113,7 @@ class SemanticScuttle_Service_Factory
     protected static function loadDb()
     {
         global $dbhost, $dbuser, $dbpass, $dbname,
-            $dbport, $dbpersist, $dbtype;
+            $dbport, $dbpersist, $dbtype, $dbneedssetnames;
 
         if (self::$db !== null) {
             return;
@@ -130,7 +130,9 @@ class SemanticScuttle_Service_Factory
                 self::$db
             );
         }
-        $db->sql_query('SET NAMES UTF8');
+
+        $dbneedssetnames && $db->sql_query('SET NAMES UTF8');
+
         self::$db = $db;
     }