Difference between revisions of "lensowiki:Installation caveats"
(what to edit) |
(add upgrade notice) |
||
Line 1: | Line 1: | ||
+ | ==New installations== | ||
The current MediaWiki install, 1.7.1 · 2006-07-08, will run into two problems upon trying to initialize all the initial MySQL tables if those tables are encoded in UTF8. The reason this happens is that KEY fields are limited to 1000 bytes, and each character takes up 3 bytes in UTF. When the key fields contain a combination of columns whose combined number of bytes exceeds 1000, the installation will bail. | The current MediaWiki install, 1.7.1 · 2006-07-08, will run into two problems upon trying to initialize all the initial MySQL tables if those tables are encoded in UTF8. The reason this happens is that KEY fields are limited to 1000 bytes, and each character takes up 3 bytes in UTF. When the key fields contain a combination of columns whose combined number of bytes exceeds 1000, the installation will bail. | ||
Line 19: | Line 20: | ||
This guarantees that they keys are short enough so that the install won't bail. | This guarantees that they keys are short enough so that the install won't bail. | ||
+ | |||
+ | ==Upgrades== | ||
+ | Upgrades are plagued by the same problem and require a similar workaround. However, the files to patch are '''/maintenance/archives/patch-categorylinks.sql''' and '''/maintenance/archives/patch-job.sql''', respectively. | ||
==References== | ==References== |
Revision as of 05:52, 24 July 2006
New installations
The current MediaWiki install, 1.7.1 · 2006-07-08, will run into two problems upon trying to initialize all the initial MySQL tables if those tables are encoded in UTF8. The reason this happens is that KEY fields are limited to 1000 bytes, and each character takes up 3 bytes in UTF. When the key fields contain a combination of columns whose combined number of bytes exceeds 1000, the installation will bail.
The obvious solution to this is to encode your tables in a different encoding. But what if you want to still use UTF8? There is a solution.
As of 1.7.1, there are two tables affected by this problem: categorylinks and jobs (The key is 2 * (255 + 255 +8) = 1032). Both of these changes need to be made in /maintenance/tables.sql before running the initial configuration.
In categorylinks, you need to change the following line:
KEY cl_sortkey(cl_to,cl_sortkey),
to
KEY cl_sortkey(cl_to(253),cl_sortkey),
To find the line, open the file in your favorite text editor, and search for /cat. Scroll down until you see the original line as shown above.
In jobs, you need to change
KEY (job_cmd, job_namespace, job_title)
to
KEY (job_cmd(166), job_namespace, job_title(166))
To find the line, search for /jobs. Scroll down until you see the original line as shown above.
This guarantees that they keys are short enough so that the install won't bail.
Upgrades
Upgrades are plagued by the same problem and require a similar workaround. However, the files to patch are /maintenance/archives/patch-categorylinks.sql and /maintenance/archives/patch-job.sql, respectively.
References
These bugs are actually filed on the MediaWiki bugzilla. See