Talk:WikiDB/Tables

From TestWiki
< Talk:WikiDB
Revision as of 14:16, 31 December 2013 by HappyDog (Talk | contribs) (SQL error when creating tables)

Jump to: navigation, search

Most old comments have been archived[1]. They were largely questions regarding table creation, due to the fact that my WikiDebug extension used to just display an unwieldy table. Now the required SQL is displayed directly in the page, and the questions are no longer relevant (I think!).

[FIXED?] Field too long

wikidb_fielddata 1071 - Specified key was too long. Max key length is 500 :(

I'm guessing that this error is occuring when you are creating the indexes in your local copy of the wikidb_fielddata table. This may be because the version of MySQL you are using is incompatible with my DB - I haven't tested on anything except 3.23.58. I'm guessing the binary fields require 2 bytes per character, and with a 255 character limit, that means a key of 510 bytes. Perhaps this is a config setting. Please let me know if you find a good fix for this, or if I am off the mark with my diagnosis, and thanks for taking the trouble to write. --HappyDog 23:54, 5 January 2007 (GMT)
Just to update this, as far as I'm aware this issue is now fixed. All the current indexes seem to fit within the 1000 byte limit of MySQL 4/5, even if multi-byte character sets are being used (e.g. UTF-8). They may exceed the 500 byte limit of MySQL 3 if a multi-byte character set is being used (though it should be fine with single-byte charsets) - however MySQL 3 is very old now so I'm not going to worry about supporting it unless there are actual users who are reporting problems and are unable to upgrade.
If anyone does encounter this problem, then please let me know the version of MySQL you are using, plus the full text of the error message you receive, and I will see what I can do. Otherwise I will assume that nothing further needs to be done in relation to this issue. --HappyDog 20:54, 13 September 2010 (BST)

SQL error when creating tables

I was having all sorts of trouble installing this extension... even on a fresh MW install it failed

Then I found this page and tried manually creating the tables... phpMyAdmin advised an error in SQL syntax

turns out that for MySQL 5.5 you need to change TYPE = MyISAM; to ENGINE = MyISAM; then the create queries work

Hi there,
Sorry you had trouble installing. The MediaWiki engine automatically takes care of the engine declaration (it inserts either TYPE or ENGINE depending on your version of MySQL) so this is unlikely to have been the original cause of your problems. I would be very interested to hear about your difficulties so I can either improve the documentation or fix the extension, as appropriate.
In the meantime, I have fixed this page (by updating my WikiDebug extension, which is used to generate the table schema) so that it now outputs ENGINE instead of TYPE. Until 5.5 was released, TYPE was more compatible as all MySQL versions supported it. However, as you say, since 5.5 this is no longer the case, and for all versions of MySQL that MW still supports, ENGINE will work whereas TYPE may not.
Thanks for getting in touch - I hope I can help further with your installation issues.
--HappyDog 13:16, 31 December 2013 (UTC)