[mirrorbrain-commits] [opensuse-svn] r6629 - trunk/tools/download-redirector-v2/mod_mirrorbrain

From: Novell Forge SVN <noreply_at_novell.com>
Date: Sun, 1 Mar 2009 14:10:07 -0700 (MST)
Author: poeml
Date: 2009-03-01 14:10:05 -0700 (Sun, 01 Mar 2009)
New Revision: 6629

Modified:
   trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c
Log:
mod_mirrorbrain:
- update the compiled in default of the SQL query for the changed database
  scheme


Modified: trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c
===================================================================
--- trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c	2009-03-01 21:08:20 UTC (rev 6628)
+++ trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c	2009-03-01 21:10:05 UTC (rev 6629)
@@ -84,21 +84,17 @@
 #endif
 #define DEFAULT_MIN_MIRROR_SIZE 4096
 
-#define DEFAULT_QUERY "SELECT fs.serverid, s.identifier, " \
-                             "s.region, s.country, s.asn, s.prefix, " \
-                             "s.score, s.baseurl, " \
-                             "s.region_only, s.country_only, " \
-                             "s.as_only, s.prefix_only, " \
-                             "s.other_countries, s.file_maxsize " \
-                      "FROM file f " \
-                      "LEFT JOIN file_server fs " \
-                      "ON f.id = fs.fileid " \
-                      "LEFT JOIN server s " \
-                      "ON fs.serverid = s.id " \
-                      "WHERE f.path=%s " \
-                             "AND s.enabled " \
-                             "AND s.status_baseurl " \
-                             "AND s.score > 0"
+#define DEFAULT_QUERY "SELECT id, identifier, region, country, " \
+                             "asn, prefix, score, baseurl " \
+                             "region_only, country_only, " \
+                             "as_only, prefix_only, " \
+                             "other_countries, file_maxsize " \
+                      "FROM server " \
+                      "WHERE id::smallint = any(" \
+                          "(SELECT mirrors " \
+                           "FROM filearr " \
+                           "WHERE path = %s)::smallint[]) " \
+                      "AND enabled AND status_baseurl AND score > 0"
 
 
 module AP_MODULE_DECLARE_DATA mirrorbrain_module;

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on 2009-03-01Z21:10:43

This archive was generated by hypermail 2.2.0 : 2009-07-10Z19:18:11 GMT