[Rt-commit] rt branch, 4.0/sphinx-on-mysql-5.5, created. rt-4.0.18-130-g0b4868f

Alex Vandiver alexmv at bestpractical.com
Thu Dec 26 19:10:44 EST 2013


The branch, 4.0/sphinx-on-mysql-5.5 has been created
        at  0b4868f0c670535d364b7166f8e2607196425a49 (commit)

- Log -----------------------------------------------------------------
commit 0b4868f0c670535d364b7166f8e2607196425a49
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Dec 26 19:08:41 2013 -0500

    Work around bugs in name resolution in SphinxSE on MySQL 5.5
    
    No existant version of SphinxSE is currently capable of resolving
    hostnames in CONNECTION= strings on MySQL 5.5.  As such, default to
    127.0.0.1 when configuring the SphinxSE table on MySQL 5.5 or above.
    See http://sphinxsearch.com/bugs/view.php?id=1815

diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index eab7203..12f910b 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -146,10 +146,16 @@ if ( $DB{'type'} eq 'mysql' ) {
         default => $DEFAULT{'table'},
         silent  => !$OPT{'ask'},
     );
-    my $url = $OPT{'url'} || prompt(
+
+    my $url = 'sphinx://localhost:3312/rt';
+    my $version = ($dbh->selectrow_array("show variables like 'version'"))[1];
+    $url = 'sphinx://127.0.0.1:3312/rt'
+        if $version and $version =~ /^(\d+\.\d+)/ and $1 >= 5.5;
+
+    $url = $OPT{'url'} || prompt(
         message => "Enter URL of the sphinx search server; this should be of the form\n"
                  . "sphinx://<server>:<port>/<index name>",
-        default => 'sphinx://localhost:3312/rt',
+        default => $url,
         silent  => !$OPT{'ask'},
     );
     my $maxmatches = $OPT{'maxmatches'} || prompt(

-----------------------------------------------------------------------


More information about the rt-commit mailing list