Strange DB Problem | topic started 3/16/2004; 10:01:47 AM last post 3/18/2004; 9:09:12 AM |
|
|
|
|
|
Arnold K. Pizer - Re: Strange DB Problem 3/18/2004; 9:09:12 AM (reads: 1051, responses: 0) |
Hi Mark, That sounds reasonable. Probably the database got partiallly written when something died in midstream. First definitely make a backup of the database or be anal and make two. Before you do this compress the database to make it a more managable size. Then run export_webwork-database.pl which will tell you the correct syntax (basically export_webwork-database.pl mth100 text_db). The very last entries in the text_db will be of the form: where in your case I assume "name1", the name of the offending set, is empty. You should remove this list. This might do it, but I'm not sure. In fact you may well have to go to the next step. The next to last entries are of the form [login<>apizer] which for each login gives the psvn's of the assigned sets. In your case you might have to remove all the entries (if any) of the form =12345 (i.e those with an empty name) I think the list of sets is generated bygetAllSetNumbersForStudentLoginHash which uses the above index. To be absoluely sure, I would have to look at the code which I am not doing right now. If after doing this you still have problems, you might have to remove the stuff from the guts of the database. A typical entry looks like [597652] The last item stnm=name1 identifies the name of the set which is associated to the given psvn (597652 in the example). If you find any entries with stnm= you might have to remove them, i.e. remove everything from [597652] to stnm= . To leave the database absolutely clean, if you remove a psvn (e.g. 597652), you should remove all references to it. A single psvn appears in three locations (under [set..., under [login..., and under itself [597652] After cleaning up the database, you can import it with import_webwork-database.pl Good luck, be careful, and keep backups.
Arnie |