Commit graph

11 commits

Author SHA1 Message Date
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
Greg Sabino Mullane
609ad54835 Force inserted bools to be ints, per Tim's suggestion on bug 15148.
This should be fine for now as Postgres uses SMALLINTs for BOOLs, to 
match MySQLs BOOL/TINYINT aliasing and subsequent MW coding assumptions.
It's possible this will cause bad effects if inserted values are called 
in a boolean context when they are going into a non-SMALLINT column, but we can handle 
those as they come up.
2008-08-21 13:10:19 +00:00
Chad Horohoe
e8ad8d066d Remove DB logic from SearchEngine. New method in Database and associated subclasses called getSearchEngine() does this now. 2008-08-18 15:22:00 +00:00
Chad Horohoe
6cd47a4f5e bug 14907 - DatabasePostgres::fieldType() wasn't defined, fatal errors abound. 2008-07-24 12:37:07 +00:00
Chad Horohoe
fcc6f32017 (bug 14763) Strict standards issue in DatabasePostgres (also happened with DatabaseOracle, no one reported it though). 2008-07-09 18:14:01 +00:00
Greg Sabino Mullane
5e6fc17565 Handle multi-insert ignores properly, as pointed out on wikitech. 2008-07-05 17:00:01 +00:00
Greg Sabino Mullane
d5b7177cf5 Properly handle the 'IGNORE' option passed to the insert funtion:
rather than just turning off errors, do some savepoint trickery 
so we end at the same state as when we started, to emulate 
MySQL's INSERT...IGNORE. Bug 14708.
2008-07-04 15:57:44 +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
Greg Sabino Mullane
9532aa9eaa Add some quick no-ops for the new lock() and unlock() funcs. 2008-06-24 20:58:10 +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/DatabasePostgres.php (Browse further)