PDA

View Full Version : Database error Help


goshalim
10-14-2011, 02:01 AM
Hi , Since this morning iam receiving Database error. I run my Db from the Cpanel but still doesnt work or fixed.

this is the message received in the cpanel

canarybr_canary.fnewfiledata
error : 12 when fixing table
error : Not enough memory for blob at 342578404 (need 10133987)
status : Operation failed





Also vbulletin gives you this message as well

Database error in vBulletin 4.1.1 Beta 1:

Invalid SQL:
(
SELECT
COUNT(*) AS count, SUM(fd.filesize) AS sum
FROM fnewattachment AS a
INNER JOIN fnewfiledata AS fd ON (a.filedataid = fd.filedataid)
LEFT JOIN fnewattachmenttype AS at ON (at.extension = fd.extension)
INNER JOIN fnewalbum AS album ON (album.albumid = a.contentid)
LEFT JOIN fnewprofileblockprivacy AS pbp ON (pbp.userid = a.userid AND pbp.blockid = 'albums')
LEFT JOIN fnewuser AS user ON (a.userid = user.userid)
WHERE
a.contenttypeid = 8 AND
(
(
a.contentid = 0
AND
a.userid = 1
)
OR
(
a.contentid <> 0
)
)
AND a.userid = 1
) UNION ALL (
SELECT
COUNT(*) AS count, SUM(fd.filesize) AS sum
FROM fnewattachment AS a
INNER JOIN fnewfiledata AS fd ON (a.filedataid = fd.filedataid)
LEFT JOIN fnewattachmenttype AS at ON (at.extension = fd.extension)
LEFT JOIN fnewpost AS post ON (post.postid = a.contentid)
LEFT JOIN fnewthread AS thread ON (post.threadid = thread.threadid)
LEFT JOIN fnewuser AS user ON (a.userid = user.userid)
WHERE
a.contenttypeid = 1 AND
(
(
a.contentid = 0
AND
a.userid = 1
)
OR
(
thread.forumid IN (0, 6, 50, 116, 5, 28, 21, 83, 69, 70, 36, 111, 117, 4, 105, 71, 91, 92, 93, 94, 19, 14, 15, 13, 109, 106, 108, 52, 53, 59, 54, 60, 55, 61, 56, 62, 58, 38, 110, 73, 98, 40, 75, 42, 49, 12, 104, 99, 100, 101, 102, 103, 107, 120, 121, 122, 123, 124, 125, 127, 128, 126, 39, 16, 17, 84, 79, 85, 86, 87, 23, 88, 89, 90, 130, 29, 112, 113, 114, 115, 129, 32, 30, 81, 82, 118, 119) AND (
thread.forumid IN (0, 6, 50, 116, 5, 28, 21, 83, 69, 70, 36, 111, 117, 4, 105, 71, 91, 92, 93, 94, 19, 14, 15, 13, 109, 106, 108, 52, 53, 59, 54, 60, 55, 61, 56, 62, 58, 38, 110, 73, 98, 40, 75, 42, 49, 12, 104, 99, 100, 101, 102, 103, 107, 120, 121, 122, 123, 124, 125, 127, 128, 126, 39, 16, 17, 84, 79, 85, 86, 87, 23, 88, 89, 90, 130, 29, 112, 113, 114, 115, 129, 32, 30, 81, 82, 118, 119)
OR
thread.postuserid = 1
) AND (
a.state <> 'moderation'
OR
a.userid = 1
OR
thread.forumid IN (0, 6, 50, 116, 5, 28, 21, 83, 69, 70, 36, 111, 117, 4, 105, 71, 91, 92, 93, 94, 19, 14, 15, 13, 109, 106, 108, 52, 53, 59, 54, 60, 55, 61, 56, 62, 58, 38, 110, 73, 98, 40, 75, 42, 49, 12, 104, 99, 100, 101, 102, 103, 107, 120, 121, 122, 123, 124, 125, 127, 128, 126, 39, 16, 17, 84, 79, 85, 86, 87, 23, 88, 89, 90, 130, 29, 112, 113, 114, 115, 129, 32, 30, 81, 82, 118, 119)
) AND (
(
post.visible = 1
AND
thread.visible = 1
)
OR
(
thread.forumid IN (0, 6, 50, 116, 5, 28, 21, 83, 69, 70, 36, 111, 117, 4, 105, 71, 91, 92, 93, 94, 19, 14, 15, 13, 109, 106, 108, 52, 53, 59, 54, 60, 55, 61, 56, 62, 58, 38, 110, 73, 98, 40, 75, 42, 49, 12, 104, 99, 100, 101, 102, 103, 107, 120, 121, 122, 123, 124, 125, 127, 128, 126, 39, 16, 17, 84, 79, 85, 86, 87, 23, 88, 89, 90, 130, 29, 112, 113, 114, 115, 129, 32, 30, 81, 82, 118, 119)
)
OR
(
thread.forumid IN (0, 6, 50, 116, 5, 28, 21, 83, 69, 70, 36, 111, 117, 4, 105, 71, 91, 92, 93, 94, 19, 14, 15, 13, 109, 106, 108, 52, 53, 59, 54, 60, 55, 61, 56, 62, 58, 38, 110, 73, 98, 40, 75, 42, 49, 12, 104, 99, 100, 101, 102, 103, 107, 120, 121, 122, 123, 124, 125, 127, 128, 126, 39, 16, 17, 84, 79, 85, 86, 87, 23, 88, 89, 90, 130, 29, 112, 113, 114, 115, 129, 32, 30, 81, 82, 118, 119)
AND
post.visible = 2
AND
thread.visible = 2
)
)
)
)
AND a.userid = 1
) UNION ALL (
SELECT
COUNT(*) AS count, SUM(fd.filesize) AS sum
FROM fnewattachment AS a
INNER JOIN fnewfiledata AS fd ON (a.filedataid = fd.filedataid)
LEFT JOIN fnewattachmenttype AS at ON (at.extension = fd.extension)
INNER JOIN fnewsocialgroupmember AS sgm ON (sgm.userid = a.userid AND sgm.groupid = a.contentid AND sgm.type = 'member')
INNER JOIN fnewsocialgroup AS sg ON (sg.groupid = a.contentid)
LEFT JOIN fnewuser AS user ON (a.userid = user.userid)
WHERE
a.contenttypeid = 7 AND
(
(
a.contentid = 0
AND
a.userid = 1
)
OR
(
sg.options & 8 AND (
a.state <> 'moderation'
OR
a.userid = 1
)
)
)
AND a.userid = 1
) UNION ALL (
SELECT
COUNT(*) AS count, SUM(fd.filesize) AS sum
FROM fnewattachment AS a
INNER JOIN fnewfiledata AS fd ON (a.filedataid = fd.filedataid)
LEFT JOIN fnewattachmenttype AS at ON (at.extension = fd.extension)
LEFT JOIN fnewblog AS blog ON (a.contentid = blog.blogid)
LEFT JOIN fnewblog_user AS bu ON (bu.bloguserid = blog.userid)
LEFT JOIN fnewuser AS user ON (user.userid = blog.userid)
LEFT JOIN fnewblog_groupmembership AS gm ON (blog.userid = gm.bloguserid AND gm.userid = 1)
WHERE
a.contenttypeid = 15 AND
(
(
a.contentid = 0
AND
a.userid = 1
)
OR
(
a.contentid <> 0 AND
(
(
blog.state <> 'draft'
AND
blog.pending = 0
)
OR
blog.userid IN (1)
)

)
)
AND a.userid = 1
) UNION ALL (
SELECT
COUNT(*) AS count, SUM(fd.filesize) AS sum
FROM fnewattachment AS a
INNER JOIN fnewfiledata AS fd ON (a.filedataid = fd.filedataid)
LEFT JOIN fnewattachmenttype AS at ON (at.extension = fd.extension)
LEFT JOIN fnewcms_node AS node ON (a.contentid = node.nodeid)
LEFT JOIN fnewuser AS user ON (user.userid = node.userid)
WHERE
a.contenttypeid = 18 AND
(
(
a.contentid = 0
AND
a.userid = 1
)
OR
(
a.contentid <> 0
)
)
AND a.userid = 1
);

MySQL Error : Table './canarybr_canary/fnewfiledata' is marked as crashed and last (automatic?) repair failed
Error Number : 144
Request Date : Thursday, October 13th 2011 @ 09:58:17 PM
Error Date : Thursday, October 13th 2011 @ 09:58:17 PM
Script : http://www.canarybreeder.net/up/forum/private.php
Referrer : http://www.canarybreeder.net/up/forum/forum.php
IP Address : 62.152.16.169
Username : admin
Classname : vB_Database
MySQL Version : 5.1.56



Please i need some help

Thanks

kh99
10-14-2011, 12:24 PM
I should start by saying I'm not a database admin or anything, and if you have access to someone who is through your host or something like that, you should contact them to help. That said, the error says that a table is crashed and the repair failed, so maybe you could close your forum and then try again to repair that table. If that fails I suppose you may need to restore a backup.

In searching the forum for a mention of this table, I found that you had problems before with attachments. Have you considered changing the option so that attachments are saved as files (as opposed to in the database)?

goshalim
10-14-2011, 12:45 PM
Hi

Thanks so much for you reply,I have contacted this morning with my hosting provider who did help me to sort out the problem and fix it,

It seems that a member was trying to upoload something really big and his caused the problem. File was deleted an the problem was sorted. The i have changed the permisons for any kind of attachement so that i can avoid same kind of problem.

Please explain me what do you mean about the attachements saved as files , who they are saved now and was is the difference.

Thanking you in advance for your time.

kh99
10-14-2011, 06:27 PM
Well, to be honest I thought there was an option to move the attachment file data to the file system, but in version 4.1.5 it seems to be marked "don't touch this", so I don't know if I'm missing it or what (maybe someone else can help).

Videx
10-14-2011, 07:12 PM
In 417 the Attachment Manager dialog appears normal to me. Storage Type: Attachments Attachments are currently being stored in the filesystem at /home/shannond/forum_images Action:
Move Items from File System into Database
Move Items to a Different Directory

I agree that only for the smallest of forums would you ever want to store images in your database. Really Bad Idea.