1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

I have a corrupted frm file

Discussion in 'vBulletin' started by Abhik, May 25, 2011.

  1. #1
    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
     

    Attached Files:

    Abhik, May 25, 2011 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    .frm file is just the definition gor the table structure. If that's the only bad file, just pull it from a backup.
     
    digitalpoint, May 26, 2011 IP
  3. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #3
    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?
     
    Abhik, May 27, 2011 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    It should yes... as long as you haven't made any structural changes to your table (like changing indexes).
     
    digitalpoint, May 27, 2011 IP
  5. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #5
    I just tried that.. It's showing..

    Incorrect file format 'mst_filedata'
    Code (markup):
    Any workarounds?
     
    Abhik, May 27, 2011 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    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.
     
    digitalpoint, May 27, 2011 IP
  7. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #7
    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
     

    Attached Files:

    Abhik, May 27, 2011 IP
  8. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #8
    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).
     
    digitalpoint, May 27, 2011 IP
  9. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #9
    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?
     
    Abhik, May 27, 2011 IP
  10. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #10
    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... :(
     
    digitalpoint, May 27, 2011 IP
  11. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #11
    Aah!! Okay.

    Thanks Shawn for you time.
     
    Abhik, May 27, 2011 IP
  12. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #12
    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.

    [​IMG]
    [​IMG]

    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?
     
    Abhik, May 29, 2011 IP
  13. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #13
    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.
     
    digitalpoint, May 29, 2011 IP
  14. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #14
    :D
    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.
     
    Abhik, May 29, 2011 IP
  15. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #15
    I'd just wait to hear back from the vB guys... maybe they have an easier solution for you. :)
     
    digitalpoint, May 29, 2011 IP
  16. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #16
    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.
     
    Abhik, May 29, 2011 IP
  17. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #17
    Shawn,
    Zachery there at vb managed to bring back my attachments.

    Thanks for your suggestions though.
     
    Abhik, May 31, 2011 IP