Database testing

Creating a test plan for databases
What do we need to test, in terms of how MediaWiki deals with databases?


 * Permissions. One problem we ran into with PostgreSQL: they had their db set up differently from how we were doing installation. So we should check anything in any database where permissions are different from how they are in MySQL.
 * For example, you can set up a user in PostgreSQL that's not a superuser, but who can create users & databases. We didn't test for that case.
 * Other RDBMSes, such as DB2, might also have finer-grained permissions than mysql does. This includes:
 * ownership of tables
 * ability of user to update, delete data from tables
 * TO TEST: make sure page updates work.


 * Searching. There are different ways you can use native formats? MyISAM vs InnoDB, for example, and the use of InnoDB to do special MYSQL searching, and other similar differences in other DBs like PostgreSQL?
 * TO TEST:


 * Schema changes. Our schema changes are slightly different for PostgreSQL and other DBs.
 * Example: sqlite - we munge the MySQL schema & use that for SQLite; it would be good to make sure no further munging is necessary.
 * make sure schema updates correctly
 * make sure the MW schema doesn't end up in the postgres or template1 database in PostgreSQL
 * TO TEST:

quoting on DB things identifier -- quoting table names or column names in a query good to test against all RDBMSes do we have custom table names?

check for any tables that extensions create. does it work in all DBs? probably an easy place to make a difference.

MySQL is the only DB that ... identifiers primarily with backticks

check weird page names - long, unicode characters, having spaces

transactions. We use them extensively with PostgreSQL, maybe other DBs as well. Make sure that, if they are nested, they are nested correctly. tested that by doing an import of a Wikipedia dump

dump import

ensure dump export is clean no matter the database example problem: PHP characters at the end of the dump.

check that we have field sizes set up correctly whatever maximum HTML field is --- can it be stored correctly in database?

Databases & variants to test
MySQL (InnoDB & MyISAM), SQLite, Microsoft SQL Server and SQL Server Express, PostgreSQL.