The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Script for recreating deleted "thread" record?
My board is unfortunately suffering rather frequently from phantom thread deletions which are always accompanied by a MySQL error 1030 "got code 127 from table handler". It's infuriating and I guess I have to put it down to the MySQL v4.0.12 corruption bug. My host refuses to upgrade to MySQL v4.0.15 so there's pretty much nothing I can do.
The specifics of what happens is that the "thread" record for the thread goes missing but all the "post" records are still there. The error message I get always contains the threadid. So, what I've been doing is re-inserting the correct thread record based on data from the post table. Clearly this must be automatable with a script that just takes the threadid as an argument and inserts a thread record based on data from the post table. Before I go and write such a script, has anyone done something like that already? Thanks, Michael. |
#2
|
||||
|
||||
Actually, if you host refuses to upgrade, you should choose another host. Even if you have a script to fix that problem, it is a band-aid on a shot gun wound. A bad SQL server or bad implementation of it is a disaster waiting to happen.
If the tables are being corrupted, what guarantee do you have that your data will remain intact, much less accessible, in the future? If your host doesn't care about the customer enough to upgrade, then they do not deserve your business. |
#3
|
|||
|
|||
Well - changing hosts is not a trivial matter. In any case, they have now upgraded to MySQL 4.0.15a (without telling me) but at least they did it and it has solved the problem.
Michael. |
#4
|
|||
|
|||
Hmm - even post 4.0.15a I've had one random thread deletion :\
So, I wrote a little thread recovery script anyway in case I have to do this when I don't have much time. Takes a threadid and forumid arguments and then recreates the thread record from existing post records. Everything apart from the number of views can be accurately re-created (I set number of views to the replycount * 10 as a rough value). This script hasn't been tested extensively so it probably doesn't handle a bunch of exceptional conditions. It does do what I need it to do though btw, you have to stick it (threadrecover.php, attached) in your .../forum/admin directory. Michael. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|