Handbuch:externallinks-Tabelle

From mediawiki.org
This page is a translated version of the page Manual:Externallinks table and the translation is 50% complete.
Handbuch:Inhaltsübersicht MediaWiki-Datenbank-Layout externallinks-Tabelle
MediaWiki Version:
1.6

Die externallinks-Tabelle ist der Ort, wo MediaWiki externe Links speichert und verfolgt.

Protocol-relative links are stored twice in this table as per r102951.

Felder

el_id

MediaWiki Version:
1.22

Der Primärschlüssel. Presently not used for anything, but will help with online schema changes.

el_from

The page id of the referring wiki page.

el_to

Die eigentliche URL selbst. It is passed to the browser.

el_index

This is the same URL as el_to search-optimized: username and password information is stripped, and the other components are reversed for faster searching, so http://user:password@sub.example.com/page.html becomes http://com.example.sub./page.html, which allows searches of the form 'Show all links pointing to *.example.com'.

el_index_60

MediaWiki Version:
1.29

This is el_index truncated to 60 bytes to allow for sortable queries that aren't supported by a partial index.


TODO: Drop the default once this is deployed everywhere and code is populating it.


Schematische Übersicht

MediaWiki Version:
1.30

DESCRIBE externallinks;

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| el_id       | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from     | int(10) unsigned | NO   | MUL | 0       |                |
| el_to       | blob             | NO   | MUL | NULL    |                |
| el_index    | blob             | NO   | MUL | NULL    |                |
| el_index_60 | varbinary(60)    | NO   | MUL | NULL    |                |
+-------------+------------------+------+-----+---------+----------------+
MediaWiki Version:
1.29

DESCRIBE externallinks;

+-------------+------------------+------+-----+---------+----------------+
| Field       | Type             | Null | Key | Default | Extra          |
+-------------+------------------+------+-----+---------+----------------+
| el_id       | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from     | int(10) unsigned | NO   | MUL | 0       |                |
| el_to       | blob             | NO   | MUL | NULL    |                |
| el_index    | blob             | NO   | MUL | NULL    |                |
| el_index_60 | varbinary(60)    | NO   | MUL |         |                |
+-------------+------------------+------+-----+---------+----------------+
MediaWiki Versions:
1.22 – 1.28

DESCRIBE externallinks;

+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| el_id    | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| el_from  | int(10) unsigned | NO   | MUL | 0       |                |
| el_to    | blob             | NO   | MUL | NULL    |                |
| el_index | blob             | NO   | MUL | NULL    |                |
+----------+------------------+------+-----+---------+----------------+
MediaWiki Versions:
1.10 – 1.21

DESCRIBE externallinks;

+----------+------------------+------+-----+---------+-------+
| Field    | Type             | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+-------+
| el_from  | int(10) unsigned | NO   | MUL | 0       |       |
| el_to    | blob             | NO   | MUL | NULL    |       |
| el_index | blob             | NO   | MUL | NULL    |       |
+----------+------------------+------+-----+---------+-------+
MediaWiki Versions:
1.6 – 1.9

DESCRIBE externallinks;

+----------+-----------------+------+-----+---------+-------+
| Field    | Type            | Null | Key | Default | Extra |
+----------+-----------------+------+-----+---------+-------+
| el_from  | int(8) unsigned | NO   | MUL | 0       |       |
| el_to    | blob            | NO   | MUL | NULL    |       |
| el_index | blob            | NO   | MUL | NULL    |       |
+----------+-----------------+------+-----+---------+-------+

Indexe

MediaWiki Version:
1.29

SHOW INDEX IN externallinks;

+---------------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table         | Non_unique | Key_name         | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| externallinks |          0 | PRIMARY          |            1 | el_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from          |            1 | el_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from          |            2 | el_to       | A         |           0 |       40 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to            |            1 | el_to       | A         |           0 |       60 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_to            |            2 | el_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index         |            1 | el_index    | A         |           0 |       60 | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index_60      |            1 | el_index_60 | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_index_60      |            2 | el_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60 |            1 | el_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60 |            2 | el_index_60 | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| externallinks |          1 | el_from_index_60 |            3 | el_id       | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+---------------+------------+------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+