Commit graph

60 commits

Author SHA1 Message Date
Greg Sabino Mullane
ee2b60ca60 Correct casing for PL/pgSQL 2010-08-04 11:58:35 +00:00
Alexandre Emsenhuber
c13687bdb6 Standardisation of file headers 2010-08-01 21:13:44 +00:00
Platonides
df0793dc59 Followup r69909. This.. is.. no.. longer... a global! 2010-07-26 20:55:44 +00:00
Sam Reed
24bb8304f2 Followup r69921
PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting T_PAAMAYIM_NEKUDOTAYIM in includes/db/DatabasePostgres.php on line 1157
2010-07-26 06:57:58 +00:00
Platonides
36d86e7ae9 Kill $wgDBversion 2010-07-25 22:09:34 +00:00
Platonides
77fa1cdc99 Kill $wgDBsuperuser 2010-07-25 21:02:42 +00:00
Sam Reed
e8a5082c22 Fix spaces from r69814
Grrrr
2010-07-23 20:58:09 +00:00
Sam Reed
ffa27f26f1 Add missing $wgDBname global 2010-07-23 20:41:53 +00:00
Max Semenik
775adbf329 Got rid of remaining usages of immediateBegin()/immediateCommit(), marked these functions with wfDeprecated() 2010-07-05 19:47:46 +00:00
Max Semenik
75d41fe3b6 Refactored Database*::getLag(): moved the default implementation to MySQL, replaced it with a proper dummy, deleted stub implementations from other classes. This adds fake lag support to all databases. 2010-07-02 13:17:28 +00:00
Max Semenik
67ebe72ade * Replaced the mess of every database class implementing filedExists() is its own way with one simple function in base class. Verified to work on MySQL, Postgres and SQLite.
* Fixed fieldInfo() on Postgres not using tableName() and thus failing for table user, for example.
* Made fieldInfo() on MySQL return false instead of throwing a query error if table does not exist. This is consistent with other databases' behaviour.
2010-07-02 10:01:09 +00:00
Max Semenik
b1fc491ae0 Fixed yet another borkage from r67707 2010-06-29 09:20:09 +00:00
Max Semenik
83b88a5f3b Fixed a fatal installer failure on PG introduced in r67707. 1.16 is unaffected 2010-06-29 09:11:37 +00:00
Chad Horohoe
44229b50e6 Fixed a bunch of silly instances of [^!=]==\s*(true|false) 2010-06-09 11:44:05 +00:00
Platonides
62a615c6c0 Actually check sourceFile for failure, showing the error message in the install.
See report on http://permalink.gmane.org/gmane.org.wikimedia.mediawiki/33902
Fixed several tag nesting problems from setup_database().
Make sourceFile() always use text errors in the installer. It can't handle 
exceptions properly (introduced in r36211). But they are appropiate for update.php
thus the ugly branches.
The installer now always handles sourceFile() errors.
2010-04-29 21:49:58 +00:00
Chad Horohoe
b9648ffd01 Kill last vestiges of mediawiki_version. Nobody actually uses it anymore, it just gets silently updated (and only for Postgres at that) 2010-04-26 13:46:04 +00:00
Greg Sabino Mullane
0e5f0e043b Support looking up deferred constraint information. 2010-03-22 18:14:25 +00:00
OverlordQ
76e2c017c4 Force new connection to database, fixes bug 20475, might have unforseen consequences 2010-02-05 05:40:50 +00:00
Tim Starling
fd3794c5bc For r60757: implement Database::getType() explicitly in each subclass, to make Roan happy. 2010-01-08 00:31:24 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Tim Starling
c5fc589257 Replaced all instances of <<<END (which breaks vim syntax highlighting), with a type-specific end token. For HTML and SQL, this causes vim to highlight the embedded text with the HTML or SQL file type plugins respectively, which is very neat. 2009-12-07 08:51:52 +00:00
Greg Sabino Mullane
bc1196170d Typo. 2009-11-27 15:19:05 +00:00
Max Semenik
1e3b2b8d5d Abstracted some parts of database interaction for parser tests, needs verification on Postgres. SQLite still doesn't work, though fails much later 2009-11-06 10:17:44 +00:00
OverlordQ
d46dd02c81 (bug 18909) Add missing INSERT SELECT wrapper for Postgres 2009-10-27 05:33:31 +00:00
Alex Z
374b9e4af1 Mostly revert r53358 and r53365 per comments on code review. Change message to just say "Database" and remove the getDBtypeForMsg function (since I can't think of any other use for it) 2009-08-22 20:17:28 +00:00
Chad Horohoe
df296de32e * Move generic return true; various for lock functions to parent, no need to implement this everywhere
* Make LOW PRIORITY optional
* Use sourceFile instead of dbsource
2009-07-29 23:41:16 +00:00
Alex Z
bc1b8182e9 Followup to r53358 - Tweak the function name to be a little clearer as to what it does
Also make it abstract in DatabaseBase so all subclasses have to implement some human readable name 
(also make getSoftwareLink abstract for the same reason) Every current Database class already implements both.
2009-07-16 16:49:09 +00:00
Alex Z
3742d1058d (bug 19590) Database error messages are no longer hardcoded to use "MySQL".
Added a new function DatabaseBase::getDBtype() to get the DB type for messages, updated all subclasses.
Message change needs propagating.
2009-07-16 15:18:57 +00:00
Aryeh Gregor
db8cbcd108 Remove redundant no-op implementations
Followup to r52951.
2009-07-09 01:04:10 +00:00
Alexandre Emsenhuber
b682500421 quick fix for r52382: fix errors in DatabasePostgres, lock() has incompatible signature lockTables(), unlockTables() (lockTables could have some implementation but not unlockTables since PostgreSQL has no command "UNLOCK TABLES") 2009-06-26 13:25:10 +00:00
Aryeh Gregor
9244ed0c57 Abstract more methods in DatabaseBase
Notably, this will switch conditional() in MySQL from using IF() to
using CASE, like all other DBMSes.  Documentation suggests this works
back to 4.0.  If it's a problem, it's a matter of a few lines to
override it in DatabaseMysql.php.

Also, some extra explanatory comments have been added to a number of
methods in DatabaseBase.
2009-06-16 21:00:38 +00:00
Aryeh Gregor
2b83b91906 Make some Database methods optional to override
Specifically freeResult(), selectDB(), close(), and ping(), as suggested
by Tim on code review for r51918.  Where these were overridden by stubs
in subclasses, I deleted the stubs.
2009-06-16 20:22:11 +00:00
Aryeh Gregor
d20794df5c Make Database into abstract class DatabaseBase
All other databases were changed to extend DatabaseBase instead of
Database.  Database was kept as an alias for DatabaseMysql for
compatibility.  Existing explicit references to Database that I could
find were changed to DatabaseMysql for the sake of clarity.

Should cause no functional changes.
2009-06-12 17:59:04 +00:00
Tim Starling
cb3bbe1809 Implemented save/restore logic for sql_big_selects, per CR comments on r50168. 2009-05-27 06:10:48 +00:00
Tim Starling
1caee6915b Proposed fix for bug 16937: pg_version() missing server version due to PHP bug. 2009-05-11 11:35:52 +00:00
Greg Sabino Mullane
dbd2d32f30 We can rely on usesuper and not just usecreatedb here. 2009-03-24 13:37:50 +00:00
Alexandre Emsenhuber
725ea7afb3 * Fixed $fname in functions definitions to have "DatabasePostgres::..." rather than "Database::..."
* Some whitespaces tweaks
2009-02-26 09:10:18 +00:00
Alexandre Emsenhuber
87bec86ae7 (bug 17460) Client ecoding is now correctly set for PostgreSQL, as we do for MySQL with "SET NAMES utf8" 2009-02-23 21:23:14 +00:00
Tim Starling
51c311a1b0 More installer XSS 2009-02-06 03:46:35 +00:00
Roan Kattouw
a7c7a3fd33 Revert r45821, r45830, r45831 and r45835 all in order to revert r45819, per discussions on CR. Will redo part of r45819 momentarily. 2009-01-19 13:56:08 +00:00
Roan Kattouw
312316088e Attempt at cleaning up r45764, r45769 (renamed indices for SQLite compat):
* removing the indexName() hack and with it the /*i*/ stuff from tables.sql
* undoing renames of formerly implicitly named indices
* three indices have to be called different in SQLite because of naming conflicts, adding a patch to updaters.inc that does that
2009-01-16 23:02:44 +00:00
Tim Starling
f058162bc5 * Preserve usertext_timestamp index name for MySQL, prefix it for SQLite. Issues remain on the experimental non-installable DBMSes.
* Clean up some E_STRICT issues
2009-01-15 14:20:28 +00:00
Tim Starling
54c6f867df * (bug 16937) Show appropriate error message when someone attempts an install on PostgreSQL 7.3 or earlier.
* Fix some issues with the earlier migration of getServerVersion() to numeric only.
2009-01-10 00:53:26 +00:00
Alexandre Emsenhuber
7bb2cada63 * fixed Doxygen errors in Database.php, DatabasePostgres.php, DatabaseOracle.php and DatabaseMssql.php
* renamed \2types and \3types both to \types (with different number of param), Doxygen doesn't seem to like numbers in aliases
* Added aliases for @private, @protected and @public
2008-11-29 18:50:39 +00:00
Greg Sabino Mullane
6ac82136a6 Set numeric_version more globally so things like search don't break. 2008-11-22 06:49:16 +00:00
Greg Sabino Mullane
40dd8ce63f Set numeric_version 2008-11-22 06:40:46 +00:00
Greg Sabino Mullane
c3d1c42bb4 Need to bail without error if no user so installer works. 2008-11-22 06:39:55 +00:00
Tim Starling
0d322a394e * Allow $wgDiff3=false
* Don't call quickUserCan('edit') unless section edit is enabled
* In DatabasePostgres and DatabaseSqlite: throw an exception on connection error
* In DatabasePostgres: don't send an invalid connection string whenever one of the fields is empty. Use quoting.
* In Database: make the captured PHP error prettier
* Display a descriptive error message when the user navigates to index.php with PHP 4, not a parse error. Check to see if the *.php5 extension works, using file_get_contents().
* The default port number for PostgreSQL is 5432, not blank.
* Better default for $wgDBname
2008-10-06 00:45:18 +00:00
Greg Sabino Mullane
9bb6920774 Return numeric version only. 2008-09-22 03:15:17 +00:00
Tim Starling
20cfed18d9 Fixed bug 15148, total breakage of Special:BlockIP on PostgreSQL:
* Migrated to a unique index for IP block conflict detection, like we did for MySQL some aeons ago.
* Modified DatabasePostgres to return a correct affected row count for INSERT IGNORE. Tested for single and multi.
* Fixed an unrelated bug: duplicate index rc_timestamp in tables.sql
* Tested for install and upgrade on PG 8.3.

No changelog because I'll backport it to 1.13.
2008-09-06 07:05:14 +00:00