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) _at_@ -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.orgReceived on Sun Mar 01 2009 - 21:10:43 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT