Previous Thread
Next Thread
Print Thread
Rate Thread
#274963 06/13/2004 10:39 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[:"red"]SQL ERROR: Mon, Jun 14 2004 16:23:44 +1200 Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'posttesting' AND t1.B_PosterId = t2.U_Number ORDER BY t1.B_Sticky DESC,t1.B_Last_Post DESC LIMIT 21
Got error 127 from table handler
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site59/fst/var/www/html/ubbthreads/mysql.inc.php on line 158

[/]

*prays*

Sponsored Links
smoknz28 #274964 06/13/2004 10:56 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
whats your mysql error log say?

234234 #274965 06/13/2004 11:04 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Code
[ERROR][Mon, Jun 14 2004 16:58:25 +1200] [/ubbthreads/postlist.php] [Twisty] Unable to do_query: <br />      SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_LastPosterId,t1.B_LastPostNum<br />      FROM   w3t_Posts AS t1,<br />             w3t_Users AS t2<br />      WHERE  t1.B_Topic = 1<br />      AND    t1.B_Board  = 'posttesting'<br />      AND    t1.B_PosterId = t2.U_Number<br />      <br />      <br />      ORDER BY t1.B_Sticky DESC,t1.B_Last_Post DESC<br />      LIMIT 21<br />    - Got error 127 from table handler<br />[ERROR][Mon, Jun 14 2004 16:58:25 +1200] [/ubbthreads/postlist.php] [Twisty] Unable to do_query: <br />      SELECT COUNT(*)<br />      FROM   w3t_Posts AS t1<br />      WHERE  t1.B_Topic = 1<br />      <br />      AND    t1.B_Board  = 'posttesting'<br />      <br />    - Got error 127 from table handler<br />[ERROR][Mon, Jun 14 2004 16:58:40 +1200] [/ubbthreads/ubbthreads.php] [Mr. Do] Unable to do_query: <br />        SELECT t1.Bo_Title,t1.Bo_Description,t1.Bo_Keyword,t1.Bo_Total,t1.Bo_Last,t1.Bo_Number,t1.Bo_Moderated,t1.Bo_Read_Perm,t1.Bo_Write_Perm,t1.Bo_Threads,t1.Bo_Sorter,t1.Bo_Posterid,t1.Bo_LastMain,t1.Bo_LastNumber,t2.U_Username,t3.B_Subject,t3.B_Icon,t3.B_Reged,t3.B_AnonName<br />        FROM   w3t_Boards AS t1 <br />        LEFT JOIN w3t_Users AS t2 ON t1.Bo_Posterid = t2.U_Number<br />        LEFT JOIN w3t_Posts AS t3 ON t1.Bo_LastNumber = t3.B_Number<br />        WHERE  t1.Bo_Cat = 1<br />        AND    (t1.Bo_Posterid = t2.U_Number OR t1.Bo_Posterid = '0')<br />        AND    (t1.Bo_LastNumber = t3.B_Number OR t1.Bo_LastNumber ='0')<br />        AND (t1.Bo_Read_Perm LIKE '%-3-%') <br />        ORDER BY t1.Bo_Sorter<br />       - Got error 127 from table handler<br />[ERROR][Mon, Jun 14 2004 16:58:40 +1200] [/ubbthreads/ubbthreads.php] [Mr. Do] Unable to do_query: <br />              SELECT COUNT(*), SUM(B_Topic)<br />              FROM   w3t_Posts<br />              WHERE  B_Posted > 1086880194<br />              AND B_Approved = 'yes'<br />              AND    B_Board = 'mametesters'<br />             - Got error 127 from table handler<br />[ERROR][Mon, Jun 14 2004 16:58:40 +1200] [/ubbthreads/ubbthreads.php] [Mr. Do] Unable to do_query: <br />        SELECT t1.Bo_Title,t1.Bo_Description,t1.Bo_Keyword,t1.Bo_Total,t1.Bo_Last,t1.Bo_Number,t1.Bo_Moderated,t1.Bo_Read_Perm,t1.Bo_Write_Perm,t1.Bo_Threads,t1.Bo_Sorter,t1.Bo_Posterid,t1.Bo_LastMain,t1.Bo_LastNumber,t2.U_Username,t3.B_Subject,t3.B_Icon,t3.B_Reged,t3.B_AnonName<br />        FROM   w3t_Boards AS t1 <br />        LEFT JOIN w3t_Users AS t2 ON t1.Bo_Posterid = t2.U_Number<br />        LEFT JOIN w3t_Posts AS t3 ON t1.Bo_LastNumber = t3.B_Number<br />        WHERE  t1.Bo_Cat = 3<br />        AND    (t1.Bo_Posterid = t2.U_Number OR t1.Bo_Posterid = '0')<br />        AND    (t1.Bo_LastNumber = t3.B_Number OR t1.Bo_LastNumber ='0')<br />        AND (t1.Bo_Read_Perm LIKE '%-3-%') <br />        ORDER BY t1.Bo_Sorter<br />       - Got error 127 from table handler<br />  

smoknz28 #274966 06/13/2004 11:07 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I tried deleting both the board and category (it was the only board in that category btw) and then recreated them both exactly as before, but that just made it worse unfortunately.

Now both my

http://www.mameworld.info/ubbthreads/ubbthreads.php?Cat=

and

http://www.mameworld.info/ubbthreads/index.php?Cat=

...pages are throwing errors, in addition to the board page...

http://www.mameworld.info/ubbthreads/postlist.php?Cat=&Board=posttesting

I can set someone up a username if they think they can possibly fix it.

smoknz28 #274967 06/13/2004 11:45 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Which version of mysql are you using ?

Did by any chance anyone execute ALTER TABLE while someone else was using the table ?

if REPAIR TABLE didn't work, try doing the following:

mysqladmin flush-tables
cd /path/to/where/your/faulty/table/is/located/at
myisamchk -r your_table

If that doesn't work and *IF* you're using one of the latest mysql versions, please send a bug report. This is something that should never happen.

Sponsored Links
234234 #274968 06/13/2004 11:46 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
right off the mysql bug site

[]error 127 means a table is corrupted.
If you're sure it wasn't corrupted before your delete operation, than
you hit a bug. Try the latest MySQL version and try to create repeatable
test case. See also http://dev.mysql.com/doc/mysql/en/Bug_reports.html

Regards,
Sergei [/]

234234 #274969 06/13/2004 11:49 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
it could be one of the two original tables

w3t_Posts or w3t_Users

I would try repairing them with the repair command as such

REPAIR TABLE `w3t_Posts`
REPAIR TABLE `w3t_Users`

I would work my way down the list til I fixed all the tables

smoknz28 #274970 06/13/2004 11:50 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I did a...

REPAIR TABLE posttesting

...command and it returned this result...

Resource id #14 row(s) affected by your query.

But it's still giving the same errors. Hmm.

smoknz28 #274971 06/13/2004 11:52 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
repair all tables.. you really don;t know which one is borked also if this doesn't work it could be MySQL is out of memory but I would think more that a table is corrupted.. run through them all..

smoknz28 #274972 06/14/2004 12:10 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]Twisty said:
I did a...

REPAIR TABLE posttesting

...command and it returned this result...

Resource id #14 row(s) affected by your query.

But it's still giving the same errors. Hmm. [/]

REPAIR TABLE posttesting ????


You want to type these two commands (one at a time)

REPAIR TABLE w3t_Users

REPAIR TABLE w3t_Posts

Sponsored Links
Daine #274973 06/14/2004 12:24 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
After trying just the first one (repair the users table), I can no longer even access the boards Josh

http://www.mameworld.info/ubbthreads/ubbthreads.php?Cat=

smoknz28 #274974 06/14/2004 12:31 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
MySQL said:


#1016 - Can't open file: 'w3t_Users.MYI'. (errno: 144)

144 = Table is crashed and last repair failed

Ohh mamamia.


smoknz28 #274975 06/14/2004 12:37 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
mameworld_info_-_board.w3t_Boards repair error 122 when fixing table

mameworld_info_-_board.w3t_Boards repair status Operation failed

Now excuse me while I find a town bridge.

smoknz28 #274976 06/14/2004 12:40 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, you may need to do some command line repairs - like this:

https://www.ubbdev.com/forum/showflat...rev=#Post114377

smoknz28 #274977 06/14/2004 12:41 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]Twisty said:
mameworld_info_-_board.w3t_Boards repair error 122 when fixing table

mameworld_info_-_board.w3t_Boards repair status Operation failed

Now excuse me while I find a town bridge. [/]

Well that's a huge clue!

122 = Disk Quota Exceeded - you're out of room. Before you can repair anything you'll need to have enough room to do so. Make some room on the drive that MySQL is running on or request more space from your host.

Then try repairing again.

Daine #274978 06/14/2004 1:01 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I just found out about 122 and already deleted some old error logs that were taking up about 40 megs.

But this is what's now showing as soon as I select the table from the admin panel...


Can't open file: 'w3t_Users.MYI'. (errno: 144)

Error

SQL-query :

SHOW KEYS FROM `w3t_Users`

MySQL said:


#1016 - Can't open file: 'w3t_Users.MYI'. (errno: 144)


Much thanks for helping me out here btw.

smoknz28 #274979 06/14/2004 1:05 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, the repair may have hosed it worse if there wasn't enough room to do it. You'll probably need to repair from the command line. I'm not really an expert at that - but Astaran posted some commands in the link I posted above.

Daine #274980 06/14/2004 1:07 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Alright, status report.

I checked all the tables and...

w3t_Users
w3t_Boards

...are both giving 144's. The rest are fine.

Daine #274981 06/14/2004 1:09 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]JoshPet said:
Yeah, the repair may have hosed it worse if there wasn't enough room to do it. You'll probably need to repair from the command line. I'm not really an expert at that - but Astaran posted some commands in the link I posted above. [/]

Yep, that's what I think happened too. The disk space ran out and wrecked the table (there really should be some safeguard against that imo).

I will look into those commands now :-)

smoknz28 #274982 06/14/2004 1:14 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I use the error codes in this post (about halfway down) as my guide.

Usually you get an errno 28 = No space left on device first.

That usually causes the corruption. Yours was kind of the opposite.

Daine #274983 06/14/2004 2:27 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I really don't understand this. I must have easily freed up over 200 megs of space and it's still giving me this each time I attempt a repair (I tried twice)...

mameworld_info_-_board.w3t_Users repair error 122 when writing to datafile
mameworld_info_-_board.w3t_Users repair error 122 when writing to datafile
mameworld_info_-_board.w3t_Users repair status Operation failed

And the w3t_Users files aren't that big at all - no more than a couple megs total...

This isn't making any sense at all

smoknz28 #274984 06/14/2004 3:20 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Well - is this your own server? Your web files might be on a different drive than the database.

Did you try repairing from the command line? If you've got shared hosting, you'll probably need to ask your host aobut space for the MySQL database (it generally doesn't reside in your webspace) and to do some advanced repairing on it.

(I tried downloading your zip - but it was all garbled).

Daine #274985 06/14/2004 3:27 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
No not my own server unfortunately.

"Your web files might be on a different drive than the database."

It's as good a guess as any. That could very well be.

So if I understand you, more repair could be done on those tables if it's on my hosts server compared to someone uploading it on their end? I never knew that.

234234 #274986 06/14/2004 3:34 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[] scroungr said:
Which version of mysql are you using ?

Did by any chance anyone execute ALTER TABLE while someone else was using the table ?[/]

Nope, definitely not. I'm the only one here right now.

[] if REPAIR TABLE didn't work, try doing the following:

mysqladmin flush-tables
cd /path/to/where/your/faulty/table/is/located/at
myisamchk -r your_table
[/]

Can that be entered through the SQL query box, or only via commandline? And is that all entered at once, or one line at a time if the query box is used?

[] If that doesn't work and *IF* you're using one of the latest mysql versions, please send a bug report. This is something that should never happen. [/]

No prob, I'll keep everyone informed of what's going on. Thanks for your help too scroungr :-)

smoknz28 #274987 06/14/2004 3:48 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Update: I finally was able to repair those 2 tables! I dunno why it worked properly now, but it did. At least I can login.

Now I just have to fix the other errors that I originally encountered by attempting to repair the rest of the tables.

smoknz28 #274988 06/14/2004 3:58 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Ugh, after trying to repair my posts table, that went to hell and is now giving a 122.

I'm gonna have to find out from my host what's going on here when I can't even repair a table without this happening. That's not acceptable.

smoknz28 #274989 06/14/2004 4:04 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
mameworld_info_-_board.w3t_Posts repair info Found block that points outside data file at 22367...
mameworld_info_-_board.w3t_Posts repair warning Number of rows changed from 14786 to 45715
mameworld_info_-_board.w3t_Posts repair status OK

I finally have my boards back

The host was contacted and I was able to repair my posts table. Everything's back to normal again. Phew.

Once again, big thanks to Josh and scroungr for providing some very helpful tips that set me on the right track. You're good guys.

At least I now know how to deal with this situation in the future if it ever occurs again

smoknz28 #274990 06/15/2004 12:21 AM
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
np glad it worked out..

234234 #274991 06/15/2004 12:35 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)