Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13981975
D11030.id26482.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11030.id26482.diff
View Options
diff --git a/src/applications/config/check/PhabricatorSetupCheckMySQL.php b/src/applications/config/check/PhabricatorSetupCheckMySQL.php
--- a/src/applications/config/check/PhabricatorSetupCheckMySQL.php
+++ b/src/applications/config/check/PhabricatorSetupCheckMySQL.php
@@ -226,6 +226,41 @@
}
}
+ $bool_syntax = self::loadRawConfigValue('ft_boolean_syntax');
+ if ($bool_syntax != ' |-><()~*:""&^') {
+ if (!PhabricatorDefaultSearchEngineSelector::shouldUseElasticSearch()) {
+
+ $summary = pht(
+ 'MySQL is configured to search on fulltext indexes using "OR" by '.
+ 'default. Using "AND" is usually the desired behaviour.');
+
+ $message = pht(
+ "Your MySQL instance is configured to use the default Boolean ".
+ "search syntax when using fulltext indexes. This means searching ".
+ "for 'search words' will yield the query 'search OR words' ".
+ " instead of the desired 'search AND words'.\n\n".
+ "This might produce unexpected search results. \n\n".
+ "You can change this setting to a more sensible default. ".
+ "Alternatively, you can ignore this warning if ".
+ "using 'OR' is the desired behaviour. If you later plan ".
+ "to configure ElasticSearch, you can also ignore this warning: ".
+ "only MySQL fulltext search is affected.\n\n".
+ "To change this setting, add this to your %s file ".
+ "(in the %s section) and then restart %s:\n\n".
+ "%s\n",
+ phutil_tag('tt', array(), 'my.cnf'),
+ phutil_tag('tt', array(), '[mysqld]'),
+ phutil_tag('tt', array(), 'mysqld'),
+ phutil_tag('pre', array(), 'ft_boolean_syntax=\' |-><()~*:""&^\''));
+
+ $this->newIssue('mysql.ft_boolean_syntax')
+ ->setName(pht('MySQL is Using the Default Boolean Syntax'))
+ ->setSummary($summary)
+ ->setMessage($message)
+ ->addMySQLConfig('ft_boolean_syntax');
+ }
+ }
+
$innodb_pool = self::loadRawConfigValue('innodb_buffer_pool_size');
$innodb_bytes = phutil_parse_bytes($innodb_pool);
$innodb_readable = phutil_format_bytes($innodb_bytes);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 20, 8:24 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6737333
Default Alt Text
D11030.id26482.diff (2 KB)
Attached To
Mode
D11030: setup warning for mysql with default boolean syntax
Attached
Detach File
Event Timeline
Log In to Comment