Příručka:Databázová tabulka log_search

This page is a translated version of the page Manual:Log search table and the translation is 27% complete.
Manuál:Obsah MediaWiki schéma databáze Tabulka log_search
Verze MediaWiki:
1.16

The log_search table (added in r50567). Either or both log_search and logging.log_params can be used for storing data about log events. log_search, being indexed, is used for filtering for live queries. RevisionDelete for example uses it to filter log events down to the revision ID (not just page). For example, if revisions 48 and 49 are deleted by log event 29, then there would be two rows created in log_search, with ls_field equal to 'rev_id' for both fields, ls_value equal to 48 for the first field and 49 for the second field, and ls_log_id equal to 29 for both fields. For offline use (e.g. slow analytics), log_params is enough.

The functions used for storing data in log_search are usually ManualLogEntry::setRelations() and LogPage::addRelations() .

Pole

ls_field

The type of ID ('associated_rev_id ', 'log_id ', 'ipb_id ', 'target_author_id'; and according to tables.sql , 'rev_timestamp ' and 'username '.) Others can be added.

ls_value

The value of the ID (e.g. if ls_field is 'rev_id', then ls_value would contain the rev_id).

ls_log_id

Key to log_id

Přehled změn ve schématu tabulky

Verze MediaWiki:
1.16

DESCRIBE log_search;

+-----------+------------------+------+-----+---------+-------+
| Field     | Type             | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| ls_field  | varbinary(32)    | NO   | PRI | NULL    |       |
| ls_value  | varbinary(255)   | NO   | PRI | NULL    |       |
| ls_log_id | int(10) unsigned | NO   | PRI | 0       |       |
+-----------+------------------+------+-----+---------+-------+

Indexy

Verze MediaWiki:
1.30

SHOW INDEX IN log_search;

+------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table      | Non_unique | Key_name  | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| log_search |          0 | PRIMARY   |            1 | ls_field    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| log_search |          0 | PRIMARY   |            2 | ls_value    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| log_search |          0 | PRIMARY   |            3 | ls_log_id   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| log_search |          1 | ls_log_id |            1 | ls_log_id   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+