Handbuch:comment-Tabelle

This page is a translated version of the page Manual:Comment table and the translation is 42% complete.
Handbuch:Inhaltsübersicht MediaWiki-Datenbank-Layout comment table
MediaWiki Version:
1.30

Die comment-Tabelle speichert Bearbeitungen, Sperren und andere Aktionen, die üblicherweise einen textlichen Kommentar haben, welches die Aktion beschreibt. Die werden in einer separaten Tabelle gespeichert, um die Größe der Haupttabellen zu reduzieren und um Deduplizierung zu erlauben.

De-duplication is currently best-effort to avoid locking on inserts that would be required for strict de-duplication. There may be multiple rows with the same comment_text and comment_data.

Die Tabelle wurde in Gerrit change 357892 eingeführt.

Felder

comment_id

Einzigartige ID, um jeden Kommentar zu identifizieren.

comment_hash

Hash von comment_text und comment_data für Deduplizierung. The current algorithm is a signed CRC32 of the comment text XOR'd with a CRC32 of any comment data.

comment_text

Text comment summarizing the change, e.g. an editor's edit summary. This text is shown in the history and contributions . It is also used for recent changes , related changes , watchlists , and, in the case of page creation, for the list of new pages . It is rendered in a sanitized subset of wiki markup by MediaWiki\CommentFormatter\CommentFormatter::format(). Size limits are enforced at the application level, and should take care to crop UTF-8 strings appropriately.

comment_data

JSON data, intended for localizing auto-generated comments. This holds structured data that is intended to be used to provide localized versions of automatically-generated comments. When not empty, comment_text should be the generated comment localized using the wiki's content language.

Schema

MediaWiki Version:
1.30

DESCRIBE comment;

+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| comment_id   | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| comment_hash | int(11)             | NO   | MUL | NULL    |                |
| comment_text | blob                | NO   |     | NULL    |                |
| comment_data | blob                | YES  |     | NULL    |                |
+--------------+---------------------+------+-----+---------+----------------+

Indexe

MediaWiki Version:
1.30

SHOW INDEX IN comment;

+---------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table   | Non_unique | Key_name     | Seq_in_index | Column_name  | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+---------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| comment |          0 | PRIMARY      |            1 | comment_id   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| comment |          1 | comment_hash |            1 | comment_hash | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+---------+------------+--------------+--------------+--------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

Code-Verwaltung

See also