View Full Version : Self-Healing Database
filburt1
04-12-2003, 10:00 PM
This hack will attempt to automatically repair a damaged table if a database error of that type should occur.
I haven't tested this yet because I don't really know how to forcefully break my tables, but conceptually it looks like it should work. Let me know if there are problems.
filburt1
04-14-2003, 12:01 AM
Well I have been getting repair reports when any database error occurs but I haven't gotten a screwed-up table error yet.
thuffner
04-14-2003, 12:11 AM
Cool. I installed it, hopefully it works! Good idea filburt! :)
Erwin
04-14-2003, 01:10 AM
What a cool idea. Well done.
filburt1
04-14-2003, 01:11 AM
Today at 10:04 PM Erwin said this in Post #4 (https://vborg.vbsupport.ru/showthread.php?postid=381772#post381772)
What a cool idea. Well done.
It just hit me, like the 740 errors about thread.myi that I got in my Inbox this morning. ;)
JulianD
04-14-2003, 01:33 AM
Great idea.. I was thinking about it this morning, but I don't have the time to write it! thanks filburt!
Erwin
04-14-2003, 01:50 AM
740? I just got 3,500 error emails about a similar issue. :)
filburt1
04-14-2003, 01:52 AM
Well aren't we and our severely messed-up board special :p
Coincidently this seems to have started when my server changed to MySQL 4. Hopefully it's not related.
JulianD
04-14-2003, 02:05 AM
hehee I got 2000 emails last time thread.MYI was corrupted :p I just installed this hack...
Filburt, you say that I got an email when a table is repaired?
PixelFx
04-14-2003, 02:15 AM
I got that issue this morning as well, 230 emails. what happend?
filburt1
04-14-2003, 02:19 AM
Today at 10:59 PM JulianD said this in Post #9 (https://vborg.vbsupport.ru/showthread.php?postid=381793#post381793)
hehee I got 2000 emails last time thread.MYI was corrupted :p I just installed this hack...
Filburt, you say that I got an email when a table is repaired?
With every error e-mail that you get now, there will be an extra line of text with the "repair report." It'll either say it fixed it, it couldn't, or it can't fix this type of error.
Dean C
04-14-2003, 09:34 AM
Ingenius :)
Erwin
04-14-2003, 09:54 AM
I've installed it... we shall see... :)
jbear6
04-14-2003, 02:48 PM
Yesterday at 09:44 PM Erwin said this in Post #7 (https://vborg.vbsupport.ru/showthread.php?postid=381785#post381785)
740? I just got 3,500 error emails about a similar issue. :)
...and I thought 464 was a bunch!
Great idea filburt1 :)
Jbear6
filburt1
04-15-2003, 01:42 PM
Here's what the new database errors look like. Note the last line:
Database error in vBulletin Mail System :
Invalid SQL: INSERT INTO mailmessage
(userid, headers, dateline, readflag, fromname, subject, message)
VALUES
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
mysql error number: 1064
Date: Tuesday 15th of April 2003 10:34:28 AM
Script: /mailcheck.php
Referer: http://www.webdesignforums.net/showthread.php?s=&postid=72277#post72277
Repair Report: This type of error cannot be automatically repaired.
(also a teaser for my mail script :p)
mclark2112
04-15-2003, 03:19 PM
Didn't work.
for those that dont know,
check this thread re the 'Thread.MYI' error
http://www.vbulletin.com/forum/showthread.php?threadid=69171
filburt1
04-15-2003, 04:01 PM
Today at 12:13 PM mclark2112 said this in Post #16 (https://vborg.vbsupport.ru/showthread.php?postid=382527#post382527)
Didn't work.
Explain.
im gettin these errors a good 4/5 times a day, Im luck I clicked over here and found this puppy, im gunna give her a go rite now, even if it means being late for C block english12 :D
installed, and it was so easy I can still make it to class on time!
haha..
thanks filburt, im going to cross my fingers and hope this does the trick (for now) my forums are in your code. (if that makes sense)
mclark2112
04-15-2003, 08:16 PM
I installed the hack, as per the instructions and the board still went down. I got the error that the thread.myi could not be fixed.
filburt1
04-15-2003, 08:21 PM
What was the exact error message you got? I probably screwed up the regex.
filburt1
04-16-2003, 01:17 PM
Updated, should work now.
Database error in vBulletin 2.2.8:
Invalid SQL: SELECT COUNT(*) AS threads FROM thread
mysql error:
mysql error number: 0
Date: Wednesday 16th of April 2003 01:42:36 PM
Script: http://www.form-kaos.com/board/board/
Referer:
Repair Report: This type of error cannot be automatically repaired.
PKRWUD
04-17-2003, 11:41 AM
I installed it yesterday, and my board is down right now. The only difference is that I'm not receiving the error emails.
hummm, filburt have ya abondoned this hack :(
it seems as my only hope for a temp fix until vb3 hits, or a solution is thought up.
oh well, I will continue to check in here :)
filburt1
04-17-2003, 10:48 PM
I updated it a few days ago but as I've said I have no way of testing it until my database gets wasted again.
I suggested this to the devs previously but it was shot down, don't remember why.
zajako
04-17-2003, 11:12 PM
You are on a roll filburt.
umm, i'm afraid to install it, is it fixed now?
filburt1
04-25-2003, 12:35 AM
It won't break anything but it's still not working. Will fix when I figure out what the hell is wrong.
Erwin
04-25-2003, 02:24 AM
Should work, looking at the code.... keep working at it. :) It would be great to have this has a backup measure in case of table corruption.
filburt1
04-25-2003, 10:31 PM
The whole bit where it fetches the table name is wrong but I'm reasonably sure I'm using the right regexp...
filburt1
04-25-2003, 10:31 PM
...although it might work now.
TheEnd
04-26-2003, 09:25 PM
:( My email record for errors was 120, I'll keep trying though, BUT if I combine em I get like 700 :)
PKRWUD
04-28-2003, 01:44 AM
This is getting old quick. My site was going down on average once every 3 days, but it's gone down 4 times in the past 3 days. Ugh. Any luck with this yet?
filburt1
04-28-2003, 01:46 AM
Have you used the very latest edit of this hack?
GaleForce
04-28-2003, 04:17 AM
My email record for errors is well over 3000 :p
obiwan8472
05-05-2003, 10:02 PM
My site has also been experiencing thread.myi errors recently. Each time I get to it before it gets too bad but still..
Any sign of this hack working yet?
Synicide
05-08-2003, 02:58 AM
Thanks for this hack Filburt, might as well try and stop getting all those emails before they start coming in like crazy.
gmarik
05-17-2003, 08:21 PM
Does it really works, Filburt?
insanctus
05-18-2003, 01:10 AM
I am lost about something .... Everyone asking if it works when by reading he is doing a hit and miss and needs input if it works.
Do as I and take the 2 minutes to install the hack if it does not work post what it did/didn't do and then maybe he can try again.
Or perhaps it will work. Thanks Filburt for this hack I am installing now.
My board got hit just few hours ago so this is well worth a shot.
filburt1
05-18-2003, 01:12 AM
It theoretically works.
insanctus
05-18-2003, 01:16 AM
Well I just installed it.. Took all of 40 seconds. Now I will just sit and pray for 1 of 2 things.
1. I do not have find out if this works.
2. That if it messes up this does work:)
Either way it is there.
lifesourcerec
05-20-2003, 04:38 PM
I get like 3 different errors., but the main one is this:
Database error in vBulletin 2.2.6:
Invalid SQL: SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1
mysql error: Can't open file: 'thread.MYI'. (errno: 145)
mysql error number: 1016
Jacko
05-20-2003, 06:07 PM
well i was getting the thread.myi errors..
installed this hack
and i got 1 error message back saying: Table was repaired and all works great..
THANK YOU.. !
i guess you can safely say it works :)
filburt1
05-20-2003, 06:08 PM
Now that makes the hundreds of bugs worthwhile :)
Jacko
05-21-2003, 08:02 AM
indeed it does.
once again it fixed my forum this morning :)
only 1 email with DB problem :)
instead of around 150 which my dial up defo doesnt like :)
this has to be the easiest hack but yet the best. i would nominate for HOTM :)
insanctus
05-27-2003, 01:39 AM
I just wanted to report back... I have this installed and I had the miss fortune to finaly need it.
Database error in vBulletin 2.2.9:
Invalid SQL: SELECT thread.threadid,thread.replycount,thread.views,thr ead.votenum,thread.votetotal,thread.dateline,forum .allowratings FROM thread LEFT JOIN forum ON (forum.forumid=thread.forumid) WHERE thread.forumid IN (2) AND visible!=0 AND open!=0 AND open!=10 ORDER BY sticky DESC,dateline DESC LIMIT 5
mysql error: Can't open file: 'thread.MYI'. (errno: 145)
mysql error number: 1016
Date: Monday 26th of May 2003 07:16:19 PM
Script: http://sanguinox.com/forums/index.php
Referer: http://sanguinox.com/
Repair Report: The damaged table was successfully repaired.
Thanks for the hack and making it possible for my board to heal itself
Erwin
05-27-2003, 01:46 AM
Amazing! :) A great idea that works!!!
PixelFx
06-02-2003, 09:27 AM
this is hack has saved me a few times, thank you ;)
MuSuL
07-04-2003, 03:07 AM
well i wasnt able to access my board becauase of these errors... 1016, user table... now i cna access so i guess it works...
how do i tell? this is the 2nd time im fixing it.. the first time i had to fix the table running a SQL query... and it removed a line from my table.. does this remove any lines?
Link14716
07-04-2003, 07:30 PM
I just installed this onto vB3 (easy to do, but the syntax is a little different so I had to manually scan the file). I doubt I'll need it because I rarely ever get hit with a corrupted database, but it's a great hack. Thanks, filburt. :)
Boofo
07-04-2003, 07:48 PM
Today at 03:30 PM Link14716 said this in Post #52 (https://vborg.vbsupport.ru/showthread.php?postid=415334#post415334)
I just installed this onto vB3 (easy to do, but the syntax is a little different so I had to manually scan the file). I doubt I'll need it because I rarely ever get hit with a corrupted database, but it's a great hack. Thanks, filburt. :)
Could I pm you and get the revised edition, sir? ;)
Link14716
07-05-2003, 03:18 PM
Sure, go ahead. :)
obiwan8472
07-08-2003, 12:21 AM
I just installed it and 10 mins ago got an MYI error email saying Repair Report: The damaged table was successfully repaired.
Wooohoo! Best hack ever!
WCW Fan
07-16-2003, 06:31 PM
Sweet Hack Thanks so much this will come in handy
mlevenson
09-29-2003, 04:41 PM
Ok I installed it but don't know what to do with it, I know I have an error, but don't know how to cause this to go and repair it. HELP
kaotic
12-23-2003, 08:33 PM
Will this be useful with vB3 as well, or is there some kind of new feature that nullifies the purpose of this hack?
MrNase
02-27-2004, 12:32 PM
I just installed this onto vB3 (easy to do, but the syntax is a little different so I had to manually scan the file). I doubt I'll need it because I rarely ever get hit with a corrupted database, but it's a great hack. Thanks, filburt. :)
Do you plan to make it public? Iam sure a lot of people are looking forward to this :)
Jacko
07-04-2004, 10:26 PM
inc me..
sabret00the
06-05-2005, 02:57 PM
not had a problem since vB3 upgrade but indeed you should release it matt :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.