Commit graph

45 commits

Author SHA1 Message Date
Domas Mituzas
95281cb81e remove bad functions:
wfLimitResult() - replaced by Database::limitResult()
QueryPage::getOrderLimit() - replaced by getOrder() + Database::limitResult()
2004-08-20 10:32:12 +00:00
Domas Mituzas
31e4c31bd4 allow getField, selectField and select to have empty conditions and table names. 2004-08-19 13:02:01 +00:00
Domas Mituzas
8aa6ebc2da Add Database*::timestamp(), using wfTimestamp() 2004-08-10 11:12:18 +00:00
Tim Starling
045d9a3b02 marking error suppression operators so that they can easily be removed with a search and replace 2004-08-07 03:41:50 +00:00
Brion Vibber
eda444e217 Wrap Database::setTimer() in a check for existence of mysql_thread_id()
function which was added in 4.3.0. If it's not available, don't set up
the thread killer.
2004-08-06 19:07:55 +00:00
Tim Starling
1773cd1e76 * Introducing bit field for database parameters
** Database constructor calling sequence, and Database::newFromParams()
** Including flags in the server initialisation structs
** Support for setting appropriate flags from legacy globals in Setup.php
** Moved some defines to Define.php so that they can be used in LocalSettings.php, most importantly the bit field constants

* Changes related to post-parse link colouring
** Turn the link cache back on when using it for updating the links table
** No longer need to call preFill() on page view

* Better synchronisation of slave servers
** Rearranged getConnection()
** System for beginning and committing transactions when multiple connections are open
** wfAbruptExit() commits transactions, wfErrorExit() does not. Various functions changed to use wfErrorAbort()

* Allowed reporting of database errors during deferred updates by moving them above output()
2004-07-24 07:24:04 +00:00
Tim Starling
8fd8374c34 fixed bug with masterPosWait() 2004-07-23 12:36:22 +00:00
Jens Frank
fe15e23107 Fix Userlogin 2004-07-19 06:35:56 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Domas Mituzas
a5a06ca36f add Database->limitResult($limit,$offset) instead of old wfLimitResult. Allows several DB classes to be loaded concurrently. 2004-07-15 14:50:22 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Tim Starling
fbc9303fbf Log function name 2004-07-10 01:07:30 +00:00
Tim Starling
3c4d38faee Removed arbitrary change in timestamp formats between MySQL and PostgreSQL, moved global functions to GlobalFunctions 2004-06-29 12:23:59 +00:00
Tim Starling
524d56a6f1 DB error log 2004-06-29 07:09:00 +00:00
Tim Starling
05703f122b Nicer looking errors in command line mode 2004-06-26 03:28:58 +00:00
Tim Starling
0bc71915ec Check for missing mysql functions, give nice error message if they are missing rather than a blank page 2004-06-25 04:32:45 +00:00
Tim Starling
6c5254e2db allowing calls to getArray with no conditions 2004-06-21 07:31:41 +00:00
Tim Starling
b5ef8d221b Bringing the load balancer to the main branch. Still doesn't do much. I needed a DB connection cache for my Article.php alterations, which LoadBalancer provides. 2004-06-15 15:00:54 +00:00
Tim Starling
49749f3091 wfSetRef doesn't work, making isWindows() function which I was going to use somewhere else but decided against it 2004-06-12 06:05:02 +00:00
Brion Vibber
e2ee87c6e7 On emergency abort check if headers have already been sent to avoid useless warnings at that point. 2004-06-12 03:13:46 +00:00
Domas Mituzas
212c3afcb2 add wfLimitResult, for LIMIT/OFFSET compatibilities 2004-06-11 14:32:53 +00:00
Domas Mituzas
83a3aa9f8f added wfFetchRow() besides wfFetchObject. Used by objectcache code 2004-06-10 13:02:27 +00:00
Antoine Musso
52eedffd62 dont require FulltextStoplist on mysql4 databases (saves some memory) 2004-06-07 23:51:48 +00:00
Jerome Jamnicky
cf5da16687 SHOW INDEX works in MySQL 3.23.58, but SHOW INDEXES does not.
SHOW INDEX should work for 3.x and up:
http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
2004-05-24 22:24:49 +00:00
Tim Starling
de13435a76 fixed database error handling 2004-05-23 05:32:20 +00:00
Tim Starling
53a43db6a8 fixed bug in tableExists() 2004-05-23 03:38:25 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Jerome Jamnicky
315be130a5 stop newFromParams() ignoring the $bufferResults param 2004-04-16 03:26:13 +00:00
Brion Vibber
f3be3bfbe6 Don't use the connection ID in error checks. If the connection itself fails, this just spits out extra error messages and is useless. 2004-04-10 09:45:00 +00:00
Brion Vibber
3d2a067e8c HTML tweaks inching towards XHTML-friendly output. To test:
$wgMimeType = "text/xml";
	$wgDocType = "-//W3C//DTD XHTML 1.0 Transitional//EN";
	$wgDTD = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";

Mozilla will spit out angry erorrs at all the well-formedness errors.
2004-04-03 10:01:08 +00:00
Brion Vibber
68b801e987 mysql_list_tables() is deprecated; switch to more elegant solution used
in REL1_2 branch.
2004-03-24 07:49:50 +00:00
Tim Starling
bdcc49b3b6 new function updateArray(), fixed bug which caused database messages to be ignored 2004-03-23 10:13:59 +00:00
Tim Starling
8eebcbc3a0 extra debugging info 2004-03-20 14:07:56 +00:00
Brion Vibber
59c6e92429 Some changes to the link tables. They now all use a key on cur_id for the *_from column instead of strings, and have a unique index to force prevent any duplicate entries. There's not yet a clean step in the update script, so just clear out your links tables (patch-linktables.sql) and rebuild them with refreshLinks.php.
This saves trouble in a number of places where we can now do joins with the link tables to get other info (such as cur_is_redirect!) as well as the name, and fewer bits need to be juggled on page renaming, as outgoing links no longer have to be changed (cur_id remains the same when a page is renamed).

rebuildLinks.inc and some of the tools in the 'maintenance page' still need to be updated to work with the new setup. (Special:Maintenance needs a *lot* of cleanup in general. It's kind of a catch-all of vaguely defined features which suck performance like a hydroelectric dam.)

Also I've slipped in some extra debug code. And, I think 'indexes.sql' is a big waste of time and should all be moved into tables.sql. Building indexes separately doesn't help on InnoDB and won't do anything on MyISAM either if you're just going to replace the table after it's built with an imported one from a dump which creates it with indexes.
2004-03-11 09:06:13 +00:00
Tim Starling
c96c50760a freeing a result object 2004-03-08 09:37:53 +00:00
Tim Starling
840dee3ad4 * Fixed magic quotes in $_REQUEST, in Setup.php
* Converted many instances of globals from the query to $_REQUEST
* Renamed near-useless Title::getURL() to Title::getPartialURL()
* Created new Title::getURL(), to replace wfLocalUrl, wfLocalUrlE, wfFullUrl and wfFullUrlE. Replaced most instances throughout the code
* In Parser.php, generalised stripping of <nowiki>, <pre> and <math> to allow more general use such as nesting
* Moved body of Article::preSaveTransform to Parser.php
* Put lots of comments in Title.php
2004-03-06 01:49:16 +00:00
Brion Vibber
24bafe9227 Add database creation to in-place installer, plus a couple fixlets.
Installer is now able to connect to the db, check its version (and
enable some MySQL 4 features if available), create the database
if need be, create the empty tables, and grant user privs if given
the root pass. This creates a usable empty wiki.

TODO:
* Populate main page and stub log pages
* Create sysop account
* Populate MediaWiki namespace for selected language
* Better error checking
* Option for InnoDB tables?
* Other useful options like uploads and TeX (shudder)
* Support scripts still need to be checked for security.

Also fixed a minor bug in Database::tableExists which ran into infinite
loops if no tables were present, and made Database::selectDB modify
the right member variable.

To get around some problems induced by the new parser stuff, User
won't loadFromDatabase() if we're in CommandLineMode, since it ends
up trying to do so before we've set up the database and fails.
2004-03-02 09:26:57 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Mr. E23
bcab02d087 Moved google box out from 'searchdisabled' message. Appended google box to title search result page. 2004-02-15 15:59:45 +00:00
Tim Starling
ca6782aefa More realistic kill procedure 2004-02-12 13:00:43 +00:00
Tim Starling
158e5ca759 Specia:Asksql security fix, Special:Asksql query timeout feature 2004-02-11 13:03:58 +00:00
Brion Vibber
4c7ff09b28 Use wgSiteMessage in no-database abort if it's set 2004-02-08 07:59:57 +00:00
Tim Starling
114ca8a146 Fixed recent bugs 2004-01-18 10:39:36 +00:00
Tim Starling
3c96949682 * Recent Changes improvements: object oriented back end, move page annotation and (untested) message queue feed.
* Misc. bugs fixed in DatabaseFunctions.php and Skin.php.
* install-utils, install and update utilise Database objects instead of handling their own connections
* schema change for RC improvement -- added rc_type, rc_moved_to_title and rc_moved_to_ns
2004-01-17 05:49:39 +00:00
Tim Starling
a4c652b0ff object-oriented database connections 2004-01-10 16:44:31 +00:00