Extension:GlobalBlocking/globalblocks table
The globalblocks table stores global blocks that have not expired. These blocks can target IP addresses and IP ranges. This table is stored on a central DB and updates to it are currently not applied via update.php (so must be done manually).
Fields edit
gb_id edit
Primary key
gb_address edit
The target of the block. One of an IP address or IP range.
gb_target_central_id edit
MediaWiki version: | ≥ 1.42 |
The central ID for the target of the block. 0 if the target is an IP address or IP range.
gb_by edit
The username of the performer of the global block.
gb_by_central_id edit
MediaWiki version: | ≥ 1.38 |
The central ID for the performer of the global block.
gb_by_wiki edit
The wiki where the block was performed, used to provide a link to the performer of the block on another wiki.
gb_reason edit
The reason provided to the global block by the performer of the block.
gb_timestamp edit
The timestamp the block was applied.
gb_anon_only edit
Whether the global block only targets anon users
gb_expiry edit
The expiry timestamp for the block. Blocks can have an infinite expiry.
gb_range_start edit
The first IP address in hexadecimal form for the range of IPs that is targeted by this block. For a block that targets a single IP this will be the same as gb_address
but in hexadecimal form.
gb_range_end edit
The last IP address in hexadecimal form for the range of IPs that is targeted by this block. For a block that targets a single IP this will be the same as gb_address
but in hexadecimal form.
Schema summary edit
MediaWiki version: | ≥ 1.42 |
DESCRIBE globalblocks;
+----------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+------------------+------+-----+---------+----------------+ | gb_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | gb_address | varbinary(255) | NO | MUL | NULL | | | gb_by | varbinary(255) | NO | | | | | gb_by_central_id | int(10) unsigned | NO | | NULL | | | gb_by_wiki | varbinary(255) | NO | | NULL | | | gb_reason | varbinary(767) | NO | | NULL | | | gb_timestamp | binary(14) | NO | MUL | NULL | | | gb_anon_only | tinyint(1) | NO | | 0 | | | gb_expiry | varbinary(14) | NO | MUL | NULL | | | gb_range_start | varbinary(35) | NO | MUL | NULL | | | gb_range_end | varbinary(35) | NO | | NULL | | | gb_target_central_id | int(10) unsigned | NO | MUL | 0 | | +----------------------+------------------+------+-----+---------+----------------+
MediaWiki versions: | 1.39 – 1.41 |
DESCRIBE globalblocks;
+----------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+------------------+------+-----+---------+----------------+ | gb_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | gb_address | varbinary(255) | NO | MUL | NULL | | | gb_by | varbinary(255) | NO | | | | | gb_by_central_id | int(10) unsigned | NO | | NULL | | | gb_by_wiki | varbinary(255) | NO | | NULL | | | gb_reason | varbinary(767) | NO | | NULL | | | gb_timestamp | binary(14) | NO | MUL | NULL | | | gb_anon_only | tinyint(1) | NO | | 0 | | | gb_expiry | varbinary(14) | NO | MUL | NULL | | | gb_range_start | varbinary(35) | NO | MUL | NULL | | | gb_range_end | varbinary(35) | NO | | NULL | | | gb_target_central_id | int(10) unsigned | NO | MUL | 0 | | +----------------------+------------------+------+-----+---------+----------------+
Indexes edit
MediaWiki version: | ≥ 1.42 |
SHOW INDEX IN globalblocks;
+--------------+------------+----------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored | +--------------+------------+----------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | globalblocks | 0 | PRIMARY | 1 | gb_id | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 0 | gb_address | 1 | gb_address | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 0 | gb_address | 2 | gb_anon_only | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_range | 1 | gb_range_start | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_range | 2 | gb_range_end | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_timestamp | 1 | gb_timestamp | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_expiry | 1 | gb_expiry | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_target_central_id | 1 | gb_target_central_id | A | 0 | NULL | NULL | | BTREE | | | NO | +--------------+------------+----------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
MediaWiki version: | ≤ 1.41 |
SHOW INDEX IN globalblocks;
+--------------+------------+----------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored | +--------------+------------+----------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+ | globalblocks | 0 | PRIMARY | 1 | gb_id | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 0 | gb_address | 1 | gb_address | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 0 | gb_address | 2 | gb_anon_only | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_range | 1 | gb_range_start | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_range | 2 | gb_range_end | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_timestamp | 1 | gb_timestamp | A | 0 | NULL | NULL | | BTREE | | | NO | | globalblocks | 1 | gb_expiry | 1 | gb_expiry | A | 0 | NULL | NULL | | BTREE | | | NO | +--------------+------------+----------------------+--------------+----------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+