wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
MediaWiki running with an old mysql or php without mysqli cannot
use the newly added flags property of Database::fieldInfo.
For backward compatibility add the missing properties using the flags
property to the result of Database::fieldInfo.
Added missing unsigned, numeric, blob and zerofill properties to the
MysqlField using flags in mysqli.
The missing fields in mysqli are taken from
http://php.net/manual/en/function.mysql-fetch-field.php
Follow-Up: I641dc1fad0a5bb14815f55e0357243a562fd672b
Change-Id: I1da904df72f8af7725fc7ff94121ef85b18a36f8
The primary key of the user table is an unsigned int, the column
user_newtalk.user_id refer the id and should have the same typ to store
the same values as the user table does.
No pre-deployment activity necessary; no need to sync deployment
and merge; can be done at any time (now or later)
Bug: T77005
Change-Id: I641dc1fad0a5bb14815f55e0357243a562fd672b
Doc comments state that these methods return ints. In order to ensure
that, values must be cast to int before they are returned.
With respect to selectRowCount(), follows-up 65f81d2843.
Change-Id: I108221ce4ad1b5b103b015fe875de54e04781741
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
* Add optional $context parameter to wfDebug, wfDebugLog, wfLogDBError
and wfErrorLog that will be passed to MWLogger.
* Add support for PSR-3 style log message parameter interpolation in
MWLoggerLegacyLogger.
* Add context information to wfLogDBError calls made from DatabaseBase,
DatabaseMysqlBase and LoadBalancer instances.
* Deprecate wfDebugTimer() which now appears to be unused.
Change-Id: Ic90d593d00a2b0b5b80ed205908cbe624042603c
I noticed enwiki's Special:Version page was reporting the version
of MariaDB 10 as "5.5.5-10.0.11-MariaDB-log" rather than just
"10.0.11-MariaDB-log". This change should fix that.
Change-Id: I6bf7e27e88014f70594b33d089636b09b6c97527
These functions actually does not return anything, so the @return is
wrong here. '@return void' is ignored.
Change-Id: I11495ee05b943c16c1c4715d617c8b50de22276c
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I7b65fe04db431342cc58b469dc48f41a50c4e891
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
Variants included 'in <version>', 'as of <version>' and just the
version number.
Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.
Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
I found two calls to wfLogDBError() that do not add a new line
at the end of the message. So instead of adding them to that
entries, I changed wfLogDBError() to automatically put it on
icoming messages; as for wfDebugLog().
Change-Id: Id014b5827a0aeef6873ebf08d78f0a3d7581d63b
Percona Server does not include its name in its version suffix.
It would be possible to check for precompiled versions of the
product using the version_comment variable, though not third-
party builds from its source code (which are merely indicated
as "Source distribution").
Given that even Percona itself does not distinguish between
Percona Server and MySQL in their version of the mysql command-
line client, I have chosen simply to remove the broken check.
I have also made the check for MariaDB consistent with that
in its version of mysql (by also checking for the old suffix
"-maria-").
Follows-up 0eab1ace67.
Change-Id: I62c3949b775a38f28f09568ebb28af2adb9be69b
Probably the fakeMaster/fakeSlave stuff was originally intended to be
generic, but the existing code in Database.php is making some very
MySQL-specific assumptions. So let's evict it from Database.php (except
for the minimal support functions) and put it in DatabaseMysqlBase where
it makes more sense.
This also takes care of fixing the breakage described in I5d2a1696 by
reverting Id6268193 and the problematic bit of I364e192e (again).
Change-Id: I3dc6ca216bf2c2f07d3090e86f2539292e1fa86b
This gets the web installer working without the mysql or mysqli
PHP extension, which is not needed for other database systems.
* Avoid "lego" construction: put link text directly in the messages,
which because the messages are parsed as wikitext, is easy to do.
* Put URLs in separate, ignored messages to avoid duplication in
Database*::getSoftwareLink().
* Because I had to touch a MySQL-related i18n message, I figured
this would be a good time to address bug 28281 (regarding MySQL
forks and Special:Version).
* Other miscellaneous message changes, such as recommending the
mysqli PHP extension over the old, deprecated mysql extension.
Bug: 28281
Bug: 58167
Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea
These members are accessed from DatabaseMysqlBase::masterPosWait and
DatabaseBase::masterPosWait, causing errors if the wiki has slave
databases or has fakeSlaveLag set.
This reverts commit d0325927d4.
Change-Id: I563bde457274dad2f254145426376b275b597e2a
* This uses MYSQLI_SET_CHARSET_NAME to set the charset to utf8/binary
* This replaces a live WMF hack to skip the extra round trip
Change-Id: I1718e013fcdc95163d111d460f0dd6d2190a99b1
DatabaseMysqlBase::fieldType() is used in the maintenance script
convertLinks.php for upgrading from MediaWiki 1.2 or earlier. This
script was failing when the mysqli extension was enabled.
Follows-up b1cc3511fd, b2d64432ee, and 00299ecb95.
Change-Id: I5d888f4dd344ecba15506023d35f6d2d6e24cfd8
* Some callers get the DB and flip DBO_TRX off, which does not
help much if simply connecting to the DB starts a transaction.
Change-Id: I2bc90a1cdeade13ccb546db1183ab08f25156da1
- Removed double spaces
- Added space after if/switch/foreach
- Removed space on elseif
- Added space around parentheses
- Added newline at end of file
- Removed space before semicolon at end of line
Change-Id: Id40b87e04786c6111e6686d7f7eea1e588bdf37d
According to the PHP manual, it is the recommended way to set the charset.
- mysql extension has it for MySQL >= 5.0.7
- mysqli extension has it for MySQL >= 5.0.6
or if using mysqlnd.
Change-Id: I8cd2f97fcad4b045c6f99ff894254847b13c6878
We were missing a method to list out views defined in a database. This
patch adds in MysqlBase::isView() and MysqlBse::listViews().
Since listViews() cache its result in DatabaseBase::$allViews, we also
introduce a final DatabaseBase::clearViewsCache() to let us clear the
per process cache.
Finally, fixed fatal error when duplicating VIEWs in MySQL.
bug: 43571
Change-Id: I8650baa4b721fe69ea3e1d557dd76745c0c7754e
Throws exception unconditionally, installer support is totally broken.
This reverts commit b2d64432ee.
Change-Id: I2edb78440806754c42d48c5da2ff74b4cb40fa2d