Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:redirect table

From mediawiki.org
Translate this page
Languages:
Manual:Contents
MediaWiki database layout
redirect table
MediaWiki version:
1.9

Theredirect table contains for each page that is currently aredirect (i.e., not for old revisions which are redirects) the ID of the source page and the information about target.The target page may or may not exist.

Fields

[edit]

A target is broken into four parts: interwiki prefix (should be empty for a regular redirect), namespace, title and fragment.

rd_from

[edit]

Contains thepage_id of the source page.

rd_namespace

[edit]

Contains the number of the target'sNamespace.

rd_title

[edit]

Contains the sanitized title of the target page.It is stored as text, with spaces replaced by underscores.

rd_interwiki

[edit]
MediaWiki version:
1.16

This field is not empty only if aninterwiki prefix is used: #REDIRECT [[prefix:…]] (a prefix such as "w:" for Wikipedia, or aninterlanguage link prefix such as "nl:" for Dutch, but not both).In this case a redirect is not visible in Special:WhatLinksHere (even if the target lies in the same wiki),rd_namespace is always 0 andrd_title may contain a possible namespace prefix, butrd_fragment may be non-NULL.

rd_fragment

[edit]

Containsthe target's fragment ID if present (see alsobugzilla:218), otherwise is NULL.

Schema summary

[edit]
MediaWiki version:
1.16

DESCRIBEredirect;

+--------------+------------------+------+-----+---------+-------+| Field        | Type             | Null | Key | Default | Extra |+--------------+------------------+------+-----+---------+-------+| rd_from      | int(10) unsigned | NO   | PRI | 0       |       || rd_namespace | int(11)          | NO   | MUL | 0       |       || rd_title     | varbinary(255)   | NO   |     |         |       || rd_interwiki | varbinary(32)    | YES  |     | NULL    |       || rd_fragment  | varbinary(255)   | YES  |     | NULL    |       |+--------------+------------------+------+-----+---------+-------+
MediaWiki versions:
1.10 – 1.15

DESCRIBEredirect;

+--------------+---------------------+------+-----+---------+-------+| Field        | Type                | Null | Key | Default | Extra |+--------------+---------------------+------+-----+---------+-------+| rd_from      | int(10) unsigned    | NO   | PRI | 0       |       || rd_namespace | int(11)             | NO   | MUL | 0       |       || rd_title     | varchar(255) binary | NO   |     | NULL    |       |+--------------+---------------------+------+-----+---------+-------+
MediaWiki version:
1.9

DESCRIBEredirect;

+--------------+---------------------+------+-----+---------+-------+| Field        | Type                | Null | Key | Default | Extra |+--------------+---------------------+------+-----+---------+-------+| rd_from      | int(8) unsigned     | NO   | PRI | 0       |       || rd_namespace | int(11)             | NO   | MUL | 0       |       || rd_title     | varchar(255) binary | NO   |     | NULL    |       |+--------------+---------------------+------+-----+---------+-------+

Indexes

[edit]
MediaWiki version:
1.9

SHOWINDEXINredirect;

+----------+------------+-------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+| Table    | Non_unique | Key_name    | Seq_in_index | Column_name  | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |+----------+------------+-------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+| redirect |          0 | PRIMARY     |            1 | rd_from      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               || redirect |          1 | rd_ns_title |            1 | rd_namespace | A         |           0 |     NULL | NULL   |      | BTREE      |         |               || redirect |          1 | rd_ns_title |            2 | rd_title     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               || redirect |          1 | rd_ns_title |            3 | rd_from      | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |+----------+------------+-------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
Engines
Current
Former
Technical documentation
Configuration
Development
Core tables
Current
Former
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Redirect_table&oldid=6866386"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp