Manual:Log search table
Language: | English |
---|
↑ Manual:Contents | MediaWiki database layout | log_search |
MediaWiki version: | ≥ 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().
Fields[edit | edit source]
ls_field[edit | edit source]
The type of ID ('rev_id', 'log_id', 'ipb_id', 'target_author_id'; and according to tables.sql, 'rev timestamp' and 'username'.) Others can be added.
ls_value[edit | edit source]
The value of the ID (e.g. if ls_field is 'rev_id', then ls_value would contain the rev_id).
ls_log_id[edit | edit source]
Key to log_id
Versions[edit | edit source]
(Current as of v1.22)
MediaWiki version: | ≥ 1.18 |
mysql> DESCRIBE log_search; +-----------+------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------------+------+-----+---------+-------+ | ls_field | varbinary(32) | NO | PRI | NULL | | | ls_value | varchar(255) | NO | PRI | NULL | | | ls_log_id | int(10) unsigned | NO | PRI | 0 | | +-----------+------------------+------+-----+---------+-------+ 3 rows in set (0,10 sec)
MediaWiki version: | 1.17 |
MediaWiki version: | 1.16 |
![]() |
Engines: MySQL – Oracle – PostgreSQL – SQLite Technical documentation: Schema (tables ) – API property associations – Field prefixes – Primary key storage in other fields – Wikimedia extension tables Configuration: Settings – Sharing Development: Access – Optimization – Policy – Updater – Extension schema updates – Patch file Core tables: archive – category – categorylinks – change_tag – config – externallinks – filearchive – hitcounter – image – imagelinks – interwiki – iwlinks – ipblocks – job – l10n_cache – langlinks – logging – log_search – msg_resource – msg_resource_links – module_deps – objectcache – oldimage – page – pagelinks – page_props – page_restrictions – protected_titles – querycache – querycachetwo – querycache_info – recentchanges – redirect – revision – searchindex – sites – site_stats – tag_summary – templatelinks – text – transcache – updatelog – uploadstash – user – user_former_groups – user_groups – user_newtalk – user_properties – valid_tag – watchlist |
---|