Hi,
I'm having a problem when trying to clone a 1.6.3 MediaWiki (the plan
being to clone it to another machine then upgrade to 1.9.x).
This Wiki is running on Windows XP (sorry). It started off as 1.4, and
was upgraded to 1.5 then 1.6. The upgrade process in both cases was to
install the new mediawiki software, and run the install script giving it
the parameters to access the existing database, then customize it.
What I'm trying to do this time is a bit different - both upgrade and
move. The idea is to copy the mediawiki directory over, then use
mysqldump to dump the DB, then load it into a new MySQL db (with the
same user IDs, passwords, etc.).
The process seems to work, until I edit and save a page on the clone.
At that point I get this:
A database query syntax error has occurred. This may indicate a bug
in the software. The last attempted database query was:
INSERT INTO `kahlua_text` (old_id,old_text,old_flags) VALUES (NULL,'Hi,
I\'m Ian Smith...','utf-8')
from within function "Revision::insertOn". MySQL returned error
"1364: Field 'old_comment' doesn't have a default value
(localhost)".
Now, this error seems reasonable -- Revision::insertOn is doing an
insert into kahlua_text (kahlua_ is my DB prefix), and it's only
supplying values for old_id,old_text,old_flags; and sure enough,
old_comment is there, and doesn't have a default value. SHOW CREATE on
either the original or the cloned DB shows:
kahlua_text | CREATE TABLE `kahlua_text` (
`old_id` int(8) unsigned NOT NULL auto_increment,
`old_namespace` tinyint(2) unsigned NOT NULL default '0',
`old_title` varchar(255) character set latin1 collate latin1_bin NOT
NULL default '',
`old_text` mediumtext NOT NULL,
`old_comment` tinyblob NOT NULL,
`old_user` int(5) unsigned NOT NULL default '0',
`old_user_text` varchar(255) character set latin1 collate latin1_bin
NOT NULL default '',
`old_timestamp` varchar(14) character set latin1 collate latin1_bin
NOT NULL default '',
`old_minor_edit` tinyint(1) NOT NULL default '0',
`old_flags` tinyblob NOT NULL,
`inverse_timestamp` varchar(14) character set latin1 collate
latin1_bin NOT NULL default '',
PRIMARY KEY (`old_id`),
KEY `old_timestamp` (`old_timestamp`),
KEY `name_title_timestamp`
(`old_namespace`,`old_title`,`inverse_timestamp`),
KEY `user_timestamp` (`old_user`,`inverse_timestamp`),
KEY `usertext_timestamp` (`old_user_text`,`inverse_timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
So I guess I don't get why this error doesn't pop up on the original
Wiki?
But more to the point, how can I clone this Wiki? Is there some upgrade
script I can run to fix the table? I would rather do the
clone-then-upgrade process; but if I upgrade-then-clone, will that fix
it?
Thanks,
Ian Smith
Motorola | Good Technology Group
ismith(a)motorola.com
408-352-7467
4250 Burton Drive, Santa Clara, CA 95054
www.motorola.com/good