## Installation

### problem running npl-update

by Darwyn Cook -
Number of replies: 4
We are running webwork 2.4.1. I am doing the end of the semester webwork updates, including updating webwork, pg, and the NPL. I did the cvs updates for webwork, pg, and the NPL, which went fine.

Then I tried to run NPL-update which produced the error:
DBD::mysql::db do failed: BLOB/TEXT column 'path' used in key specification without a key length at /opt/webwork/webwork2/bin/NPL-update line 178.

I copied the relevant code from NPL-update, the offending line 178 is in bold:
for my $tableinfo (@create_tables) { my$tabname = $tableinfo->[0]; my$tabinit = $tableinfo->[1]; my$query = "DROP TABLE IF EXISTS $tabname";$dbh->do($query);$query = "CREATE TABLE $tabname ($tabinit )";
$dbh->do($query);
}
Any thoughts on what is happening?

P.S. I did this at the end of last semester without any problems.

### Re: problem running npl-update

by Sam Hathaway -
Hi Darwyn,

What version of MySQL are you using? I increased the size of the path column to accommodate long path names, and this might be causing trouble. It seems to work with MySQL 5.1 at least...
-sam

### Re: problem running npl-update

by Darwyn Cook -
Hi Sam,
We are running version 4.1.20. I'll try to upgrade to the latest version and see if that works.

### Re: problem running npl-update

by Darwyn Cook -
The upgrade to version 5 did the trick, thanks!

### Re: problem running npl-update

by Michael Gage -
A temporary alternative to upgrading mysql
is to adjust the NPL-update code so that the maximum path length is 255:

-use constant MAXVARCHARLENGTH=>255; #(use 4096 for mysql > 5.0.3)
+ #(maximum varchar length is 255 for mysql version < 5.0.3.
+ #You can increase path length to 4096 for mysql > 5.0.3)



I've made the change for now in the version of NPL-update checked in the CVS:

http://cvs.webwork.rochester.edu/viewcvs.cgi/webwork2/bin/NPL-update

-- Mike