Hi, My "filedata" table gone corrupted and it seems I am out of ideas to fix it. The error is "Incorrect information in file: './mst_filedata.frm." I have attached the frm, MYD and MYI file. Someone please help me to get a working table. Thanks
.frm file is just the definition gor the table structure. If that's the only bad file, just pull it from a backup.
Aam!! The files in my backup is corrupted too. Shawn, will it work if I make a test install of vbulletin and pull the frm file from there and use the current MYD and MYI files?
It should yes... as long as you haven't made any structural changes to your table (like changing indexes).
I just tried that.. It's showing.. Incorrect file format 'mst_filedata' Code (markup): Any workarounds?
I just looked at your original attachment... if your MYD and MYI files are so small, the table itself doesn't contain any data... so you could just replace all 3 files from a different install and it should be fine. If there IS data in the table, it's probably in a different storage engine (not MyISAM... maybe InnoDB?), and if that's the case then your structure of the table has been changed so a stock .frm file isn't going to do a whole lot for you.
I just looked at the test install, the default storage engine for filedata table in vbulletin is MyISAM. I am sure my MYD and MYI files contains some data. However small it is as I have quite a few attachments in my forum. Feeling sorry to ask you, can you please have a look if you can do something with it? Here is a fresh frm file
I don't really know anything about how to rebuild a corrupt frm file... I would just restore a backup if it happened to me. But I *do* know that the original files you attached do not contain anything within the table. MYD = data, MYI = index If you have a bunch of attachments in your forum, they aren't in that table (either the table is not a MyISAM table and those two files are just left over from before when it was, or possibly you are storing attachments in the file system anad not in the database).
Yes, I am storing the attachments in the file system.. Okay, here is what happened with my forum. I got a system crash and some of the tables went corrupted. All my categories and forum vanished. The tables gone corrupted are dbquery deletionlog discussion discussionread editlog event externalcache faq filedata forumpermission Then I opened a support ticket and they reinstated all my forums. Now, the attachments are gone. They are no longer showing up with in posts. They are also not showing up at the Attachment Statistics in Admin CP. However, there's a small attachment icon beside the thread title at forumdisplay. They are also in the attachment folder (CHMOD 0777). I am sure the attachments are there and only the associations with the threads and connection to vbulletin are gone. Can you please tell me what the reason could be?
Unfortunately I don't know a whole lot about how attachments in the file system are referenced (I wouldn't think they use the filedata table, but I could be wrong). We don't have attachments stored in the file system here, so I can't really just look and see. You probably are going to want to open a trouble ticket with vBulletin if you have no valid backup...
Shawn, I opened a support ticket at vBulletin and Zachery Woods there brought back my attachments. Now, the problem is, the file size for all the attached files became 0 bytes. I already posted a followup of that support ticket, but he is not replying. (Weekend Break, may be) Can you do something on it, please?
If that column wasn't fixable, you might need to write a script that loops through all attachments, check their file size on disk and then update the table with the correct value.
Those things are way beyond my understandings of php (or any other language). Is that pretty hard thing to do and time consuming? If not, can you expend a little time to help me out? Sorry if that was too much demanding. Please ignore if you you feel so.
Great!! Then I'll disturb you again if I don't hear back from them by tomorrow night. Thanks Shawn. You at least brought me some hope. I though I have to live with it.