From: P. G. L. <gl...@um...> - 2007-06-26 11:35:15
|
Hi John, I'm running MySQL 4.1.20 on my servers, and think the script ran fine there. The offending line is $dbh->do("CREATE TABLE locations (location_id TINYBLOB NOT NULL, description TEXT, PRIMARY KEY (location_id(1000)))"); My bet from the error message is that the assignment of a prefix of 1000 bytes is causing the error; I wonder if the implementation of TINYBLOB is having trouble with the 1000 byte value on your machine, or in MySQL 4.0. In fact, the MySQL 4.0/4.1 documentation indicates that "Before MySQL 4.1.2, the limit is 255 bytes for all tables." So that sounds like it's likely to be the problem. If you change the prefix value to 255 it should work for you, and we might want to document somewhere that the assumption is that users are running MySQL 4.1.2 or better (or change the 1000 to 255). Gavin -- P Gavin LaRose, PhD | gl...@um... | 734.764.6454 | ...you have Program Manager, Instructional Technology | to respect someone who can Mathematics Dept, University of Michigan | spell Tuesday, even if they http://www.math.lsa.umich.edu/~glarose/ | can't spell it right. -Milne On 2007-06-25 [14:34] John Jones wrote: > Hi, > > I am trying to get my development copy of webwork working. In running > wwdb_upgrade, I get the message > >> Upgrading database from version 19 to 20... >> (Version 20 adds locations, location_addresses, set_locations and >> set_locations_user tables to database, and add restrict_ip to set and >> set_user.) >> >> An error occured while running the system upgrade code for version 20: >> DBD::mysql::db do failed: Incorrect sub part key. The used key part >> isn't a string, the used length is longer than the key part or the >> table handler doesn't support unique sub keys at ./wwdb_upgrade line 248. > I don't know if this is a bug in the script, perhaps related to my > version of mysql (4.0.20) (in which case I will be happy to file a bug > report), or if it is caused by a problem on my end. Any thoughts? > > John > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-devel > > > |