[Rt-commit] rt branch, 5.0/sphinx-utf8mb4, created. rt-5.0.0beta2-18-g7e956f7167

? sunnavy sunnavy at bestpractical.com
Mon Jul 6 11:20:07 EDT 2020


The branch, 5.0/sphinx-utf8mb4 has been created
        at  7e956f71676d7ca8b5f11286a24749e3dbac1772 (commit)

- Log -----------------------------------------------------------------
commit 7e956f71676d7ca8b5f11286a24749e3dbac1772
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Jul 6 23:18:21 2020 +0800

    Update sphinx charset to utf8mb4 to avoid "Illegal mix of collations" errors
    
    Though sphinx doesn't support unicode by default, it's good to not die
    when searching 4-bytes unicode strings, just like what we did for
    3-bytes unicode string searches.
    
    See also 7ec3ef1677

diff --git a/sbin/rt-setup-fulltext-index.in b/sbin/rt-setup-fulltext-index.in
index bca79156b4..9525633236 100644
--- a/sbin/rt-setup-fulltext-index.in
+++ b/sbin/rt-setup-fulltext-index.in
@@ -223,7 +223,7 @@ CREATE TABLE $table (
     weight INTEGER NOT NULL,
     query  VARCHAR(3072) NOT NULL,
     INDEX(query)
-) ENGINE=SPHINX CONNECTION="$url" CHARACTER SET utf8
+) ENGINE=SPHINX CONNECTION="$url" CHARACTER SET utf8mb4
 END
 
     do_error_is_ok( dba_handle() => "DROP TABLE $table" )
@@ -263,7 +263,7 @@ source rt {
     sql_user        = $sphinx_conf{'user'}
     sql_pass        = $sphinx_conf{'pass'}
 
-    sql_query_pre   = SET NAMES utf8
+    sql_query_pre   = SET NAMES utf8mb4
     sql_query       = \\
         SELECT a.id, a.content FROM Attachments a \\
         JOIN Transactions txn ON a.TransactionId = txn.id AND txn.ObjectType = 'RT::Ticket' \\

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


More information about the rt-commit mailing list