[MDEV-2564] LP:737472 - .deb sql_mode default breaks wordpress and similar applications Created: 2011-03-18 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Our .deb packages include a default my.cnf file which sets sql_mode=NO_ENGINE_SUBSTITUTION,TRADITIONAL This is a change from the MySQL packages in stock Debian and Ubuntu, which do not set sql_mode in their default my.cnf, and so default to a less strict sql_mode. One could argue that the stricter sql_mode is a better default. However, in practice it causes problems. The problem is that there are other packages in Debian that depend on a MySQL (or MariaDB) server, and which do not work with this stricter sql_mode. One such example is Wordpress. We have had several people have problems after installing MariaDB and Wordpress with apt, and then finding it does not work (I had the issue myself). The users then think that MariaDB is not compatible with Wordpress, when in reality it is just the sql_mode that is not supported by Wordpress. So we have to change the default sql_mode to be the same as MySQL Debian packages, so that a default install of the Debian Wordpress package will work with MariaDB. A user that understands my.cnf and sql_mode can easily change it as desired. A user that does not will be confused by Wordpress not working. I will change the default my.cnf for the next release. |
| Comments |
| Comment by Kristian Nielsen [ 2011-03-18 ] |
|
Re: .deb sql_mode default breaks wordpress and similar applications |
| Comment by Arjen Lentz (Inactive) [ 2011-04-01 ] |
|
Re: .deb sql_mode default breaks wordpress and similar applications I can see the point of not putting TRADITIONAL in the defaults, but there is no case for removing NO_ENGINE_SUBSTITUTION within the scope of this bug report. So rather than removing the entire line, the TRADITION bit should be removed, keeping the sql_mode=NO_ENGINE_SUBSTITUTION By the way, the rationale for also putting TRADITIONAL in is that this is the default on Windows installs, and it's been applauded by users then asking to also have this put in place on Linux. I do however appreciate that it can break existing apps, and so commenting it out with a hint can make the most sense. In the end WordPress should be able to work in strict mode, so that's something other devs (me included as I'm a wordpress user) can look at. |
| Comment by Kristian Nielsen [ 2011-04-01 ] |
|
Re: .deb sql_mode default breaks wordpress and similar applications Have you tested that adding this does not break any other Debian packages? |
| Comment by Rasmus Johansson (Inactive) [ 2011-04-03 ] |
|
Launchpad bug id: 737472 |
| Comment by Arjen Lentz (Inactive) [ 2011-04-03 ] |
|
Re: .deb sql_mode default breaks wordpress and similar applications The sql_mode=NO_ENGINE_SUBSTITUTION makes sense in the context of the current defaults. It cannot break anything, because when a specific engine is specified in a create/alter table statement, actually delivering that engine is exactly what's desired. In fact, not delivering it with a silent fail or conversion to another engine is what can cause trouble. And this setting prevents that. For instance, consider Federated or Sphinx not initialising during startup due to a misconfiguration - because mysqld only aborts if the default engine does not initialise (MyISAM or InnoDB), it'll merely log to errorlog/syslog and continue, but the failed engines won't be available. Then a table is created with that engine, silent converted back to MyISAM or InnoDB. If Federated/Sphinx specific options are specified it'll cause a syntax error which is confusing in the context, but otherwise it's all silent. I hope this clarifies. Please revert that part of your fix. |