Commit graph

93 commits

Author SHA1 Message Date
Roan Kattouw
475c331f60 Remove now-unused SQL timestamp conversion functions added in r77231. They were made obsolete by the querypage-work2 branch merge in r78786 2010-12-31 16:29:44 +00:00
Sam Reed
48ebf5bbb5 Fix private class member variable access
Some method documentation
2010-12-30 17:41:19 +00:00
Chad Horohoe
358539bc1d More old installer cruft 2010-12-17 15:49:51 +00:00
Daniel Friesen
aae05c49f8 MySQL is the only database which quotes identifiers primarily using backticks. Move the backtick based addIdentifierQuotes implementation from the generic into DatabaseMysql and take the duplicated implementation used by oracle, sqlite, ibm_db2, postgresql, and mssql and remove it from all of them migrating it to the generic Database class as the default. 2010-12-04 15:35:36 +00:00
Daniel Friesen
692ad26f68 Followup to r77713, rename quote_ident to addIdentifierQuotes to follow naming conventions better. While I'm at it adding a missing addIdentifierQuotes implementation for Ibm_db2. 2010-12-04 15:14:08 +00:00
Daniel Friesen
da469e3abe Fix a bug in the installer caused by r77487 creating installer sql statements like "GRANT ALL PRIVILEGES ON 'dbname'.* TO ''tablename''@'%" while improving the database independence of replaceVars.
* Drop unused and likely broken /*$var*/` -> `$var syntax
* Replace {$var} with '{$var}' and `{$var}` handling that uses relevant database independent quoting ({$var} without surrouding quotes are never used)
* Give the generic/mysql class a proper quote_ident implementation
* Fix the unused Oracle and Sqlite quote_ident implementations which are potential sql injections if used
* Split common variable replacemnt code off to a replaceGlobalVars and make the generic and oracle code use it instead of duplicating the same code as each other
2010-12-04 09:27:02 +00:00
Platonides
bd6b4d7af8 Replace addslashes with Database::addQuotes() 2010-11-30 18:21:55 +00:00
Alexandre Emsenhuber
6cb276056b Moved switches in Special:Unusedimages and Special:Ancientpages to extract a unix timestamp from a fielf to DatabaseBase and related classes to avoid code duplication 2010-11-24 15:40:25 +00:00
Max Semenik
c278bc2e09 Fixed $fname in some places 2010-11-23 11:21:00 +00:00
Max Semenik
4345c2c20e Refactoring of *Field classes:
* Made them all implement one common interface (might add more functions to it later)
* Moved MySQLField to DatabaseMysql.php
* Renamed nullable() to isNullable()
* Removed maxLength() from:
** SQLiteField: makes no sense
** MySQLField: doesn't do what people may think, useless for this class' purpose of assisting querying the DB schema
2010-11-21 19:56:51 +00:00
Jure Kajzer
43e9d51b0e * Oracle: prefetching column names in ORAResult so i can release statement after constructor.
This fixes too many open cursors issue, importing of large sets now works.
2010-11-18 13:17:16 +00:00
Jure Kajzer
7c0db2ba75 * BLOB temporary handling
* en/decodeBlob
2010-11-09 08:56:15 +00:00
Chad Horohoe
6150c3d8fb Oracle maintainer should enable E_STRICT ;-) 2010-10-30 17:20:41 +00:00
Chad Horohoe
8f0a7ccc00 E_STRICT: Function signature should match parent. This newFromParams stuff should be going away soon anyway 2010-10-30 17:17:26 +00:00
Jure Kajzer
e99125adf1 * installers skips recreation of existing user
* updater for 16->17 schema changes 
* i dedicate this revision to my greatest supporter ... Reedy :)
2010-10-27 14:52:18 +00:00
Jure Kajzer
1eede8e88b * DatabaseOracle - throw connection exception instead of debug+false
* DatabaseOracle - fixed $wgContLang local usage in update
* Installer - added Main Page insertion as a new installation step (fixes bug 22308)
2010-10-25 16:49:59 +00:00
Jure Kajzer
8e777b538a * fixed accidental revert of r75343 2010-10-25 12:06:37 +00:00
Jure Kajzer
ef484d5fe7 * null value => default value handling
* duplicateTable call fix
* some internal calls to query replaced with doQuery 
* added update method overload
2010-10-25 10:56:07 +00:00
Sam Reed
d189aaee05 (bug 24853) Kill failFunction - Fixed! :D 2010-10-24 21:27:33 +00:00
Jure Kajzer
49c9990074 * fixed r74949 remarks
* modified version lookup, added 9iR1 as minimum version for installation.
2010-10-19 06:25:12 +00:00
Jure Kajzer
6d11fb986f * Installer: works (beta). More testing tomorow.
* Updater: todo. For now it skips.
2010-10-18 16:09:18 +00:00
Sam Reed
6b3b915353 Big attack on unused variables... 2010-10-14 20:53:04 +00:00
Alexandre Emsenhuber
3c386b90cb __FUNCTION__ -> __METHOD__ 2010-10-02 08:04:58 +00:00
Chad Horohoe
1374598e38 Followup r72535, I suppose I shouldn't break the old installer yet 2010-09-07 12:48:48 +00:00
Jack Phoenix
0443990ccd coding style tweaks 2010-09-05 18:35:34 +00:00
Jack Phoenix
1252d00372 trim trailing spaces 2010-09-05 18:00:33 +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
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
4ea2cfe811 Followup r71241
Another $bitField to $field
2010-08-18 10:09:03 +00:00
Chad Horohoe
4c74490bb8 Big commit: kill almost every freeResult() call as useless 2010-08-08 12:27:48 +00:00
Alexandre Emsenhuber
c13687bdb6 Standardisation of file headers 2010-08-01 21:13:44 +00:00
Sam Reed
5fd23ed8b5 More unused globals 2010-07-25 17:47:41 +00:00
Sam Reed
04f68827d0 Removal of unused globals
Removal of one setting of a variable to '', then not using further
2010-07-24 19:11:52 +00:00
Tim Starling
42017a2f47 Use $wgContLang not $wgLang for checkTitleEncoding() and getSpecialPageAliases(), it doesn't make sense to use the user language, WebRequest and SpecialPage certainly don't. The DatabaseOracle use of checkTitleEncoding() is weird and probably broken, but at least it uses the right object now. 2010-07-22 04:00:39 +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
Alexandre Emsenhuber
a643b87295 Fixed some doxygen warnings 2010-07-04 14:41:26 +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
Chad Horohoe
44229b50e6 Fixed a bunch of silly instances of [^!=]==\s*(true|false) 2010-06-09 11:44:05 +00:00
Jure Kajzer
9b653aa0d5 * Fixed parserTests compatibility for Oracle
* Fixed DBPrefix not being set in the old installer
2010-06-08 18:14:28 +00:00
Jure Kajzer
2c803d58be * reportQueryError must break execution on parse and execute 2010-05-03 14:16:46 +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
Jure Kajzer
d43a5844dd oracle: missing table prefix 2010-03-02 16:58:21 +00:00
Jure Kajzer
29544758f1 tableName calls moved inside fieldInfoMulti and removed call that existed only for this call 2010-02-23 10:38:06 +00:00
Alexandre Emsenhuber
a3d4855413 Fix for r62744: use tabs for indentation, not spaces 2010-02-20 19:22:27 +00:00
Jure Kajzer
ec7782fe97 tableName has to be encoded before field type checking 2010-02-20 18:27:00 +00:00
Jure Kajzer
8fcb7e42a1 Fixed as per Tim's comments on r61179:
* made insertOneRow and getSequenceData private
* renamed fieldInfo to fieldInfoMulti and made it private (for internal use on Oracle only)
* wrapped fieldInfoMulti in fieldInfo with error if $table parameter is an array
* reverted tableName function to only support a non-array parameter
* wrapped all tableName calls with array parameter with array_map with callback
* wrapped fieldInfo into textFieldSize function to avoid reimplementation of functionality
* fixed unnessesary multiple calls to tableName with same parameter inside a single procedure
2010-01-28 14:58:45 +00:00
Jure Kajzer
3707fcc2f8 Fixed as per Tim's comments on r60665:
* fieldExists reduced to bool-cast output of fieldInfo
* added negative cache (handled acordingly on fieldInfo usage)
* uppercased parameters on entry. DB data is uppercased by default
2010-01-20 16:19:08 +00:00
Jure Kajzer
0e361f492b Fixed error suppressing suggested in r58559 by Tim. Also fixed some warnings and bugs in Oracle abstraction. 2010-01-17 20:42:54 +00:00