Should provide a way to fix setup issue "STRICT_ALL_TABLES not set" locally

Reproduction Instructions

Install Phabricator on a server where MySQL runs without STRICT_ALL_TABLES mode.

You’ll get a setup issue that STRICT_ALL_TABLES mode is not set.

The only suggested way to fix it is to change the MySQL server’s configuration globally by adding that to the sql_mode setting.

However, that is not always a viable option, as the very page about the issue itself points out:

(Note that if you run other applications against the same database, they may not work in strict mode. Be careful about enabling it in these cases.)

So what in those cases?

I know, you can safely ignore the issue, but if you want to fix it for phabricator without affecting other applications? One thing would be if that wasn’t possible, but it is, and easily.


It’s just a matter of running a query at startup to set whatever sql mode you need.

There are two easy way this could be fixed without requiring (or suggesting) the user to touch their MySQL server configuration:

  • you could just run the needed query at startup to change the sql_mode to whatever phabricator needs. So this setup issue wouldn’t exist at all.
  • or you could provide a mechanism to run such queries at startup if needed (for this and other similar setup issues). So, when this issue is detected, you could provide the user with two options (besides ignoring it) to fix it: one is the current one, to change MySQL server configuration; the other would be to edit a configuration setting that would cause the needed query to be run at startup.

Phabricator/Arcanist Version


7e2bec92807d2a6c432fd7f690e9cb7dda0b1fc3 (Fri, Sep 6)


3cdfe1fff806d2b54a2df631cf90193e518f42b7 (Thu, Sep 5)


f51f1b3f72b50246949d0917239ca84f39ec7a54 (Mon, Sep 2)




3.3 at /usr/bin/diff


2.1.4 at /usr/bin/git


3.1.2 at /usr/local/bin/hg


2.0.1 at /usr/local/bin/pygmentize


Not Available

It’s just a matter of running a query at startup to set whatever sql mode you need.

We would need to run this query on every connection. The performance cost of doing this isn’t large, but the benefit of enabling STRICT_ALL_TABLES is small.

I reduced the strength of this setup guidance in and made it more clear why this mode is recommended, but also that ignoring the guidance is a reasonable response.