Commit graph

49 commits

Author SHA1 Message Date
Platonides
c780168f9f Follow up r74135 removing the globals, too.
htmlescape the global.
2010-10-10 14:39:16 +00:00
Max Semenik
64acd61377 Fix botched up comments 2010-10-02 18:45:18 +00:00
Alexandre Emsenhuber
7ce38e5006 removed some unused variables 2010-10-02 08:31:55 +00:00
Alexandre Emsenhuber
1da312a72e Fix for r74134: copy-paste error 2010-10-02 08:30:03 +00:00
Alexandre Emsenhuber
1360aadafd removed call to deprecated function dbsource() and a comment that mentioned it 2010-10-02 08:29:01 +00:00
Alexandre Emsenhuber
3c386b90cb __FUNCTION__ -> __METHOD__ 2010-10-02 08:04:58 +00:00
Jack Phoenix
1252d00372 trim trailing spaces 2010-09-05 18:00:33 +00:00
Aryeh Gregor
338ae40072 Suggest running update.php on database error
This is a pretty frequently asked question in #mediawiki -- most
database errors are probably due to not running update.php.
2010-09-05 17:40:47 +00:00
Sam Reed
e04cd31791 Change usages of Database:: for function names in DatabaseMssql to DatabaseMssql:: 2010-08-25 15:58:58 +00:00
Sam Reed
bb6b4ba0cb Whitespace, I hate you. 2010-08-24 22:44:44 +00:00
Sam Reed
8a01281913 Remove some unreachable code (usually returns after throwing exceptions)
Fixup call of method after return in DatabaseMssql by using a temp
2010-08-24 22:03:18 +00:00
Chad Horohoe
e0cb9ef9b6 Make getSoftwareLink() static so I can use it without instantiating (and opening) a bunch of databases I probably can't support. Can't have an abstract parent now, so throw an exception for anyone who writes a child class without bothering to implement it. All of this to add some helpful text links in an infobox in the installer :) 2010-08-22 20:55:07 +00:00
Alexandre Emsenhuber
c72516a428 Fixed some doxygen warnings 2010-08-22 15:58:59 +00:00
Platonides
5d98e13b78 Try to address some of the issues of r70608.
@yaauie: Set the error_level in your php.ini, do not use calls to error_reporting() for that.
2010-08-21 14:33:32 +00:00
Sam Reed
721ecb6d2d Remove some more unused variables
Remove srvus() from Parser, unused, and calling testSrvus wrongly
2010-08-19 11:21:14 +00:00
Sam Reed
85af1b0901 Revert r71250 r71251 r71252 r71253
Know what the problem is, roughly, can't fix atm, so not leaving phase3 broken
2010-08-18 14:15:32 +00:00
Sam Reed
9ea1f1d388 Kill some crappy "failFunction" stuff, marked as old in r14625 2010-08-18 13:38:42 +00:00
Sam Reed
9efab26ecd Remove a few more unused variables 2010-08-13 08:09:52 +00:00
Platonides
f971e24aee Added missing $ to variable.
Removing (unused) global $wgDBts2schema about Postgres tsearch2
2010-08-12 14:46:32 +00:00
Chad Horohoe
4c74490bb8 Big commit: kill almost every freeResult() call as useless 2010-08-08 12:27:48 +00:00
Alexandre Emsenhuber
c8a9e82d97 * changed @addtogroup to @ingroup
* added @file
2010-08-07 20:28:58 +00:00
Max Semenik
043187edbf Follow-up r70608: you don't need to override this stuff with empty functions, they're empty in the base class already 2010-08-07 05:10:02 +00:00
Ryan Bies
070122e8b9 DatabaseMssql class and related changes 2010-08-06 23:44:00 +00:00
Chad Horohoe
967510a4b6 Remove current MSSQL implementation from trunk. See wikitech-l for discussion. 2010-04-21 16:29:29 +00:00
Max Semenik
fce6a52cf9 Fix r63320 2010-03-06 16:45:48 +00:00
Max Semenik
e78af18401 Fixed a couple of E_DEPRECATED in DatabaseMssql 2010-03-06 16:39:31 +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
291efd30f2 Followup r60051, with the rest of the callers and removing a useless subclassing from DatabaseMssql 2009-12-14 23:18:03 +00:00
Chad Horohoe
b19e37425a Update callers from immediateCommit() to commit(). The former's been deprecated a really long time...Tim did it 45243 revisions ago. 2009-12-14 23:05:35 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Max Semenik
7055d6416d (bug 20268) Fixed Database::estimateRowCount on SQLite backend. This involved moving the previous implementation to where it belongs - DatabaseMysql, and replacing it with slightly tweaked DB2 implementation. 2009-10-21 12:21:09 +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
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
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
Tim Starling
90ed80443e (bug 12586) Use wfHostname() everywhere, remove $wguname and $wgNodeName. Use getenv('COMPUTERNAME') on Windows. 2008-10-06 07:30:38 +00:00
Chad Horohoe
656e01a0af No-ops for getSearchEngine(). 2008-08-18 15:36:53 +00:00
Chad Horohoe
fc8f3277bb Found the errno for deadlocks on MsSQL, let's return a proper bool instead of no-op. 2008-07-18 12:54:12 +00:00
Alexandre Emsenhuber
78e789a435 deleted svn:executable property 2008-07-03 16:22:04 +00:00
Brion Vibber
7b78f7b7aa Revert r36755 for the moment; various things use 'new Database'
or Database::newFromParams() explicitly at the moment. While that's already bad (breaking PG support etc), I'd rather see those get fixed before we go introducing differences between Database and DatabaseMySql.
2008-07-02 18:22:38 +00:00
Chad Horohoe
de58074c74 Refactoring (un)lock. All the subclasses are currently returning true, except for mySQL. Makes more sense to put the no-op in the parent class then just subclass it as needed. Other things could maybe do this too. 2008-06-27 17:06:34 +00:00
Chad Horohoe
5bfb68f4e4 Add no-ops for the (un)lock functions. 2008-06-27 15:06:22 +00:00
Tim Starling
c6b902f180 * Reorganised the includes directory, creating subdirectories db, parser and specials
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.
2008-06-16 20:21:26 +00:00
Renamed from includes/DatabaseMssql.php (Browse further)