rdbms: Remove outdated MySQL 4 references and fix doc URLs
- Remove or clarify ancient comments referencing MySQL 4. - Oracle can't afford to host small HTML files for longer than two years, as such they make a point to break their URLs after a while. Update our references to the last 5.x release for now, where the same information resides (instead 404 or redirect to MySQL 8 docs). Bug: T34217 Change-Id: I322cc8936f96c2545c63e7c9c1f5fa241e2b8c18
This commit is contained in:
parent
21dfb00fa3
commit
6404da3d39
7 changed files with 22 additions and 26 deletions
|
|
@ -496,8 +496,8 @@ class MysqlUpdater extends DatabaseUpdater {
|
|||
}
|
||||
|
||||
/**
|
||||
* 1.4 betas were missing the 'binary' marker from logging.log_title,
|
||||
* which causes a collation mismatch error on joins in MySQL 4.1.
|
||||
* MW 1.4 betas were missing the 'binary' marker from logging.log_title,
|
||||
* which caused a MySQL collation mismatch error.
|
||||
*
|
||||
* @param string $table Table name
|
||||
* @param string $field Field name to check
|
||||
|
|
|
|||
|
|
@ -3213,12 +3213,13 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
|
|||
}
|
||||
|
||||
/**
|
||||
* USE INDEX clause. Unlikely to be useful for anything but MySQL. This
|
||||
* is only needed because a) MySQL must be as efficient as possible due to
|
||||
* its use on Wikipedia, and b) MySQL 4.0 is kind of dumb sometimes about
|
||||
* which index to pick. Anyway, other databases might have different
|
||||
* indexes on a given table. So don't bother overriding this unless you're
|
||||
* MySQL.
|
||||
* USE INDEX clause.
|
||||
*
|
||||
* This can be used as optimisation in queries that affect tables with multiple
|
||||
* indexes if the database does not pick the most optimal one by default.
|
||||
* The "right" index might vary between database backends and versions thereof,
|
||||
* as such in practice this is biased toward specifically improving performance
|
||||
* of large wiki farms that use MySQL or MariaDB (like Wikipedia).
|
||||
*
|
||||
* @stable to override
|
||||
* @param string $index
|
||||
|
|
@ -3229,12 +3230,9 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
|
|||
}
|
||||
|
||||
/**
|
||||
* IGNORE INDEX clause. Unlikely to be useful for anything but MySQL. This
|
||||
* is only needed because a) MySQL must be as efficient as possible due to
|
||||
* its use on Wikipedia, and b) MySQL 4.0 is kind of dumb sometimes about
|
||||
* which index to pick. Anyway, other databases might have different
|
||||
* indexes on a given table. So don't bother overriding this unless you're
|
||||
* MySQL.
|
||||
* IGNORE INDEX clause.
|
||||
*
|
||||
* The inverse of Database::useIndexClause.
|
||||
*
|
||||
* @stable to override
|
||||
* @param string $index
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ abstract class DatabaseMysqlBase extends Database {
|
|||
$set[] = 'sql_mode = ' . $this->addQuotes( $this->sqlMode );
|
||||
}
|
||||
// Set any custom settings defined by site config
|
||||
// (e.g. https://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html)
|
||||
// https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html
|
||||
foreach ( $this->connectionVariables as $var => $val ) {
|
||||
// Escape strings but not numbers to avoid MySQL complaining
|
||||
if ( !is_int( $val ) && !is_float( $val ) ) {
|
||||
|
|
@ -260,7 +260,7 @@ abstract class DatabaseMysqlBase extends Database {
|
|||
// Unfortunately, mysql_fetch_object does not reset the last errno.
|
||||
// Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
|
||||
// these are the only errors mysql_fetch_object can cause.
|
||||
// See https://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
|
||||
// See https://dev.mysql.com/doc/refman/5.7/en/mysql-fetch-row.html.
|
||||
if ( $errno == 2000 || $errno == 2013 ) {
|
||||
throw new DBUnexpectedError(
|
||||
$this,
|
||||
|
|
@ -293,7 +293,7 @@ abstract class DatabaseMysqlBase extends Database {
|
|||
// Unfortunately, mysql_fetch_array does not reset the last errno.
|
||||
// Only check for CR_SERVER_LOST and CR_UNKNOWN_ERROR, as
|
||||
// these are the only errors mysql_fetch_array can cause.
|
||||
// See https://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
|
||||
// See https://dev.mysql.com/doc/refman/5.7/en/mysql-fetch-row.html.
|
||||
if ( $errno == 2000 || $errno == 2013 ) {
|
||||
throw new DBUnexpectedError(
|
||||
$this,
|
||||
|
|
@ -329,7 +329,7 @@ abstract class DatabaseMysqlBase extends Database {
|
|||
// Unfortunately, mysql_num_rows does not reset the last errno.
|
||||
// We are not checking for any errors here, since
|
||||
// there are no errors mysql_num_rows can cause.
|
||||
// See https://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
|
||||
// See https://dev.mysql.com/doc/refman/5.7/en/mysql-fetch-row.html.
|
||||
// See https://phabricator.wikimedia.org/T44430
|
||||
return $n;
|
||||
}
|
||||
|
|
@ -1230,8 +1230,8 @@ abstract class DatabaseMysqlBase extends Database {
|
|||
}
|
||||
|
||||
/**
|
||||
* FROM MYSQL DOCS:
|
||||
* https://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_release-lock
|
||||
* See
|
||||
* https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_release-lock
|
||||
* @param string $lockName
|
||||
* @param string $method
|
||||
* @return bool
|
||||
|
|
|
|||
|
|
@ -740,7 +740,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
// SELECT. Thus we need S1 to also gets the revision row FOR UPDATE; otherwise, it
|
||||
// may not find it since a page row UPDATE and revision row INSERT by S2 may have
|
||||
// happened after the first S1 SELECT.
|
||||
// https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read
|
||||
// https://dev.mysql.com/doc/refman/5.7/en/set-transaction.html#isolevel_repeatable-read
|
||||
$revision = $this->getRevisionStore()
|
||||
->getRevisionByPageId( $this->getId(), $latest, RevisionStore::READ_LOCKING );
|
||||
} elseif ( $this->mDataLoadedFrom == self::READ_LATEST ) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
/**
|
||||
* Search engine hook for MySQL 4+
|
||||
* Search engine hook for MySQL
|
||||
* @ingroup Search
|
||||
*/
|
||||
class SearchMySQL extends SearchDatabase {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- 1.4 betas were missing the 'binary' marker from logging.log_title,
|
||||
-- which causes a collation mismatch error on joins in MySQL 4.1.
|
||||
-- MW 1.4 betas were missing the 'binary' marker from logging.log_title,
|
||||
-- which causes a MySQL collation mismatch error.
|
||||
|
||||
ALTER TABLE /*$wgDBprefix*/logging
|
||||
CHANGE COLUMN log_title
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
-- and comparisons of what's changed from the previous run will be
|
||||
-- displayed at the end of each run.
|
||||
--
|
||||
-- These tables currently require MySQL 5 (or maybe 4.1?) for subselects.
|
||||
--
|
||||
|
||||
drop table if exists /*$wgDBprefix*/testitem;
|
||||
drop table if exists /*$wgDBprefix*/testrun;
|
||||
|
|
|
|||
Loading…
Reference in a new issue