Skip Menu |

This queue is for tickets about the MediaWiki-DumpFile CPAN distribution.

Report information
The Basics
Id: 69983
Status: resolved
Priority: 0/
Queue: MediaWiki-DumpFile

People
Owner: Nobody in particular
Requestors: pierre.edouard.portier [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.2.2_01



Subject: "type map failed for varbinary"
Date: Wed, 3 Aug 2011 16:56:34 +0200
To: bug-MediaWiki-DumpFile [...] rt.cpan.org
From: Pierre-Edouard PORTIER <pierre.edouard.portier [...] gmail.com>
Hi! 1) Configuration : MediaWiki-DumpFile-0.2.1 perl5 (revision 5 version 12 subversion 3) Windows 7 2) Error : I obtained a "type map failed for varbinary" error with the following code : #--BEGIN---------------------------- use MediaWiki::DumpFile::Compat; $pmwd = Parse::MediaWikiDump->new; $links = $pmwd->links('D:\wikipedia\enwiki-latest-pagelinks.sql'); $link = $links->next; print 'from ', $link->from, ' to ', $link->namespace, ':', $link->to, "\n"; #--END---------------------------- The error is emited by SQL.pm at line 261 : #--BEGIN---------------------------- if (! defined($type)) { die "type map failed for $oldtype"; } #--END---------------------------- 3) Reason for the error : The reason for the bug is that in the sub create_type_map of SQL.pm the varbinary type is not taken into account. 4) Solution : I added a varbinary type to the map defined in the sub create_type_map and it solved the problem : #--BEGIN---------------------------- varbinary => 'varchar', #--END---------------------------- Cheers, Pierre-Edouard
Hello! Thank you for the perfect bug report and included resolution! I've uploaded version 0.2.2_01 which will go out for testing. As soon as testing is complete I'll have 0.2.2 on CPAN which should be only a few days. The new version also has automatic and transparent decompression support for the XML and SQL files. Cheers! Tyler Riddle
Shipped 0.2.2 to CPAN