A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Old_table below:

Manual:old table - MediaWiki

The cur and old table were replaced in 2004.

The old table is where MediaWiki versions up to MediaWiki 1.4 store historical versions of articles. These MediaWiki versions store the current version of articles in the cur table. Most fields of the old table correspond to the same fields in the cur table.

In MediaWiki 1.5 the contents of the old table and of the cur table were merged together and moved to the page table and the revision table. Finally the old table was renamed to text table. That way the text table also contains some old columns, which were part of the old table, but are now no longer needed in the text table.

After running the updater when updating from MediaWiki 1.4 or older to a newer version, all fields in the text table except old_id, old_text, old_flags are not needed anymore and can be safely deleted. For MediaWiki 1.35 and older, these fields must no longer be present to avoid database errors when attempting to edit a page.

old_text contents may be compressed, as indicated by "gzip" in the old_flags field. (Data is compressed with the gzdeflate function of PHP: there is no gzip header or checksum, set the window size to negative(?) if not using PHP to read data.)

old_id serves as a unique index for a given revision, with some caveats:

old_timestamp also may not be unique in a page history series.

DESCRIBE old;

mysql> DESCRIBE old;
+-------------------+---------------------+------+-----+---------+----------------+
| Field             | Type                | Null | Key | Default | Extra          |
+-------------------+---------------------+------+-----+---------+----------------+
| old_id            | int(8) unsigned     |      | PRI | NULL    | auto_increment |
| old_namespace     | tinyint(2) unsigned |      |     | 0       |                |
| old_title         | varchar(255) binary |      |     |         |                |
| old_text          | mediumtext          |      |     |         |                |
| old_comment       | tinyblob            |      |     |         |                |
| old_user          | int(5) unsigned     |      |     | 0       |                |
| old_user_text     | varchar(255) binary |      |     |         |                |
| old_timestamp     | varchar(14) binary  |      |     |         |                |
| old_minor_edit    | tinyint(1)          |      |     | 0       |                |
| old_flags         | tinyblob            |      |     |         |                |
| inverse_timestamp | varchar(14) binary  |      |     |         |                |
+-------------------+---------------------+------+-----+---------+----------------+

SHOW INDEX IN old;

+-------+------------+----------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name             | Seq_in_index | Column_name       | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+----------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| old   |          0 | PRIMARY              |            1 | old_id            | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | old_timestamp        |            1 | old_timestamp     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | name_title_timestamp |            1 | old_namespace     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | name_title_timestamp |            2 | old_title         | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | name_title_timestamp |            3 | inverse_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | user_timestamp       |            1 | old_user          | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | user_timestamp       |            2 | inverse_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | usertext_timestamp   |            1 | old_user_text     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
| old   |          1 | usertext_timestamp   |            2 | inverse_timestamp | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
+-------+------------+----------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4