@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove the "ONLY_FULL_GROUP_BY" SQL mode setup warning and change the setup key for "STRICT_ALL_TABLES"

Summary:
Ref T13404. Except for one known issue in Multimeter, Phabricator appears to function properly in this mode. It is broadly desirable that we run in this mode; it's good on its own, and enabled by default in at least some recent MySQL.

Additionally, "ONLY_FULL_GROUP_BY" and "STRICT_ALL_TABLES" shared a setup key, so ignoring one would ignore both. Change the key so that existing ignores on "ONLY_FULL_GROUP_BY" do not mask "STRICT_ALL_TABLES" warnings.

Test Plan: Grepped for `ONLY_FULL_GROUP_BY`.

Maniphest Tasks: T13404

Differential Revision: https://secure.phabricator.com/D20791

+1 -44
+1 -44
src/applications/config/check/PhabricatorMySQLSetupCheck.php
··· 93 93 $host_name, 94 94 phutil_tag('pre', array(), 'sql_mode=STRICT_ALL_TABLES')); 95 95 96 - $this->newIssue('mysql.mode') 96 + $this->newIssue('sql_mode.strict') 97 97 ->setName(pht('MySQL %s Mode Not Set', 'STRICT_ALL_TABLES')) 98 - ->setSummary($summary) 99 - ->setMessage($message) 100 - ->setDatabaseRef($ref) 101 - ->addMySQLConfig('sql_mode'); 102 - } 103 - 104 - if (in_array('ONLY_FULL_GROUP_BY', $modes)) { 105 - $summary = pht( 106 - 'MySQL is in ONLY_FULL_GROUP_BY mode (on host "%s"), but using this '. 107 - 'mode is strongly discouraged.', 108 - $host_name); 109 - 110 - $message = pht( 111 - "On database host \"%s\", the global %s is set to %s. ". 112 - "It is strongly encouraged that you disable this mode when running ". 113 - "Phabricator.\n\n". 114 - "With %s enabled, MySQL rejects queries for which the select list ". 115 - "or (as of MySQL 5.0.23) %s list refer to nonaggregated columns ". 116 - "that are not named in the %s clause. More importantly, Phabricator ". 117 - "does not work properly with this mode enabled.\n\n". 118 - "You can find more information about this mode (and how to configure ". 119 - "it) in the MySQL manual. Usually, it is sufficient to change the %s ". 120 - "in your %s file (in the %s section) and then restart %s:\n\n". 121 - "%s\n". 122 - "(Note that if you run other applications against the same database, ". 123 - "they may not work with %s. Be careful about enabling ". 124 - "it in these cases and consider migrating Phabricator to a different ". 125 - "database.)", 126 - $host_name, 127 - phutil_tag('tt', array(), 'sql_mode'), 128 - phutil_tag('tt', array(), 'ONLY_FULL_GROUP_BY'), 129 - phutil_tag('tt', array(), 'ONLY_FULL_GROUP_BY'), 130 - phutil_tag('tt', array(), 'HAVING'), 131 - phutil_tag('tt', array(), 'GROUP BY'), 132 - phutil_tag('tt', array(), 'sql_mode'), 133 - phutil_tag('tt', array(), 'my.cnf'), 134 - phutil_tag('tt', array(), '[mysqld]'), 135 - phutil_tag('tt', array(), 'mysqld'), 136 - phutil_tag('pre', array(), 'sql_mode=STRICT_ALL_TABLES'), 137 - phutil_tag('tt', array(), 'ONLY_FULL_GROUP_BY')); 138 - 139 - $this->newIssue('mysql.mode') 140 - ->setName(pht('MySQL %s Mode Set', 'ONLY_FULL_GROUP_BY')) 141 98 ->setSummary($summary) 142 99 ->setMessage($message) 143 100 ->setDatabaseRef($ref)