Extension:CheckUser/cu useragent table

MediaWiki version:
1.42

A table for the CheckUser extension used to store unique values of the user agent string. The rows in this table are referenced by the cuc_agent_id , cule_agent_id , cupe_agent_id columns. While this table will in most cases only have one row for a given user agent string, this is not guaranteed in case of race conditions when inserting a user agent string not seen before.

In MediaWiki release 1.42, this table is unused. However, in future releases this table will be used.

Fields

edit

cuua_id

edit

Primary key, used to uniquely identify a cu_changes row. Referenced by the cuc_agent_id , cule_agent_id , cupe_agent_id columns.

cuua_text

edit

The value of the user agent header. The value of this header may be held by other rows in this table if a race condition occurred when inserting this row, but usually the values in this column should be unique.

Schema

edit

DESCRIBE cu_useragent;

+-----------+---------------------+------+-----+---------+----------------+
| Field     | Type                | Null | Key | Default | Extra          |
+-----------+---------------------+------+-----+---------+----------------+
| cuua_id   | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| cuua_text | varbinary(255)      | NO   | MUL | NULL    |                |
+-----------+---------------------+------+-----+---------+----------------+

Indexes

edit

SHOW INDEX IN cu_useragent;

+--------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table        | Non_unique | Key_name  | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+--------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| cu_useragent |          0 | PRIMARY   |            1 | cuua_id     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| cu_useragent |          1 | cuua_text |            1 | cuua_text   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+--------------+------------+-----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+