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
DatabaseBase::factory()'s parameter array now takes an optional
'driver' variable to allow specifying a specific driver for the
database class if we support more than one.
This is so we can gracefully support mysql/mysqli as the former is
deprecated, but the concept could be extended to other databases
as well.
Bug: 45288
Co-Author: Chad Horohoe <chadh@wikimedia.org>
Change-Id: I6733fe21c4aa7443e409c5dfa7c789552b2b62b7
Previously mysql_real_escape_string() was improperly used which escapes
for inclusion in a plain string rather than an identifier.
Also adds basic test support for the DatabaseMysqlBase class.
Co-Authored by: Antoine Musso <hashar@free.fr>
Bug: 55427
Change-Id: Ic045e195c89d8d5d0f0edbda0cd1df781de7025c
PHP extensions mysql and mysqli have lots in common.
In order to support mysqli, this diff separates common MySQL behavior to abstract class DatabaseMysqlBase and implements the mysql-extension specific in DatabaseMysql.
Outside behavior remains the same.
I've tried to minimize future code duplication by introducing mysql*() methods even if the parent method just unwraps the result.
Bug: 45288
Change-Id: I905d4a4550377bc849a860f0962dad710d9dc71f