1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-01 01:18:22 +01:00

Clarify STRICT_ALL_TABLES instructions

Summary:
  - Mention the `[mysqld]` section.
  - Should be `sql_mode`, not `sql-mode`.
  - Improve clarity of the text.
  - Slightly nicer markup.

Test Plan: {F147076}

Reviewers: csilvers, btrahan

Reviewed By: btrahan

Subscribers: epriestley, spicyj

Differential Revision: https://secure.phabricator.com/D8847
This commit is contained in:
epriestley 2014-04-23 13:04:57 -07:00
parent 4135c7de37
commit 67f015a76c

View file

@ -33,25 +33,26 @@ final class PhabricatorSetupCheckMySQL extends PhabricatorSetupCheck {
"encouraged."); "encouraged.");
$message = pht( $message = pht(
"On your MySQL instance, the global sql_mode is not set to ". "On your MySQL instance, the global %s is not set to %s. ".
"'STRICT_ALL_TABLES'. It is strongly encouraged that you enable this ". "It is strongly encouraged that you enable this mode when running ".
"mode when running Phabricator.\n\n". "Phabricator.\n\n".
"By default, MySQL will fail silently and continue when certain ". "By default MySQL will silently ignore some types of errors, which ".
"error conditions occur. Sometimes contuining does the wrong thing. ". "can cause data loss and raise security concerns. Enabling strict ".
"For example, inserting too much data into a column will cause ". "mode makes MySQL raise an explicit error instead, and prevents this ".
"silent truncation (and thus data loss) instead of failing in an ". "entire class of problems from doing any damage.\n\n".
"obvious way that we can fix. These behaviors can also create ".
"security risks. Enabling strict mode raises an explicit error ".
"instead and prevents this entire class of problem from doing any ".
"damage.\n\n".
"You can find more information about this mode (and how to configure ". "You can find more information about this mode (and how to configure ".
"it) in the MySQL manual. Usually, it is sufficient to add this to ". "it) in the MySQL manual. Usually, it is sufficient to add this to ".
"your 'my.cnf' file:\n\n". "your %s file (in the %s section) and then restart %s:\n\n".
"%s\n". "%s\n".
"(Note that if you run other applications against the same database, ". "(Note that if you run other applications against the same database, ".
"they may not work in strict mode. Be careful about enabling it in ". "they may not work in strict mode. Be careful about enabling it in ".
"these cases.)", "these cases.)",
phutil_tag('pre', array(), 'sql-mode=STRICT_ALL_TABLES')); phutil_tag('tt', array(), 'sql_mode'),
phutil_tag('tt', array(), 'STRICT_ALL_TABLES'),
phutil_tag('tt', array(), 'my.cnf'),
phutil_tag('tt', array(), '[mysqld]'),
phutil_tag('tt', array(), 'mysqld'),
phutil_tag('pre', array(), 'sql_mode=STRICT_ALL_TABLES'));
$this->newIssue('mysql.mode') $this->newIssue('mysql.mode')
->setName(pht('MySQL STRICT_ALL_TABLES Mode Not Set')) ->setName(pht('MySQL STRICT_ALL_TABLES Mode Not Set'))