diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /docs/database.txt | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'docs/database.txt')
-rw-r--r-- | docs/database.txt | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/docs/database.txt b/docs/database.txt index e80a4940..b9fa6ff7 100644 --- a/docs/database.txt +++ b/docs/database.txt @@ -19,12 +19,9 @@ To make a read query, something like this usually suffices: $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( /* ...see docs... */ ); -while ( $row = $dbr->fetchObject( $res ) ) { +foreach ( $res as $row ) { ... } -$dbr->freeResult( $res ); - -Note the assignment operator in the while condition. For a write query, use something like: @@ -149,9 +146,7 @@ to avoid long-lasting locks. By default, MediaWiki opens a transaction at the first query, and commits it before the output is sent. Locks will be held from the time when the query is done until the commit. So you can reduce lock time by doing as much processing as possible before you -do your write queries. Update operations which do not require database -access can be delayed until after the commit by adding an object to -$wgPostCommitUpdateList. +do your write queries. Often this approach is not good enough, and it becomes necessary to enclose small groups of queries in their own transaction. Use the @@ -174,3 +169,20 @@ queries, by using an appropriate condition in the WHERE clause of an UPDATE, or by using unique indexes in combination with INSERT IGNORE. Then use the affected row count to see if the query succeeded. +------------------------------------------------------------------------ + Supported DBMSs +------------------------------------------------------------------------ + +MediaWiki is written primarily for use with MySQL. Queries are optimized +for it and its schema is considered the canonical version. However, +MediaWiki does support the following other DBMSs to varying degrees. + +* PostgreSQL +* SQLite +* Oracle +* IBM DB2 +* MSSQL + +More information can be found about each of these databases (known issues, +level of support, extra configuration) in the "databases" subdirectory in +this folder. |