Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2010, 12:40 AM
MadK's Avatar
MadK MadK is offline
 
Join Date: Feb 2008
Location: Canada
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Ran an SQL query, killed the forum

Hey there,
Before I start I would like to say that I used digitalpoint's vB Optimizing guide right here and I am aware that it clearly states that anything can break at any moment when applying these changes, but it was actually a mistake on my part.

The thing is that I ran the following query:
PHP Code:
ALTER TABLE post DROP INDEX useridADD INDEX userid (useridparentid
And although my database uses a prefix, the query still ran somehow.

So I ran it a second time with the appropriate prefix, and it worked... until a few hours ago.


I am now getting e-mails from the vBulletin Database Error System similar to this;

Code:
Database error in vBulletin 4.0.3:

Invalid SQL:
SELECT userid from post where threadid='222'  AND userid=12;

MySQL Error   : Table 'forums.post' doesn't exist
Error Number  : 1146
My forums now point to a non-existent table and I cannot come up with a solution.

I was hoping somebody here experienced enough in MySQL would be able to help me.

Appreciate the help and much success,
Thanks a lot!
Reply With Quote
  #2  
Old 06-12-2010, 04:42 PM
robert garrett robert garrett is offline
 
Join Date: Mar 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

restore your backup database. You did back it up first didnt you?
Reply With Quote
  #3  
Old 06-14-2010, 12:44 AM
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
Posts: 3,085
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course he has backups. Everyone that runs a forum backs up their db daily.
Reply With Quote
  #4  
Old 06-14-2010, 02:51 AM
Rafa-el's Avatar
Rafa-el Rafa-el is offline
 
Join Date: Feb 2010
Location: Nicaragua
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Videx View Post
Of course he has backups. Everyone that runs a forum backs up their db daily.
Are you sure? I bet that most of the forum owners never make backups before do something on it.
Reply With Quote
  #5  
Old 06-14-2010, 03:24 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First check, with a tool like phpMyAdmin if the table "post" and/or "prefix_post" dop exist in your database.

Next step is to check your ./includes/config.php, does it still have the prefix set correctly?

If that is all correct, did you recently install a new modification or such that might not work with prefixes?

@post #3 & #4
How are you helping with such useless posts?
Reply With Quote
  #6  
Old 06-16-2010, 03:36 AM
Rafa-el's Avatar
Rafa-el Rafa-el is offline
 
Join Date: Feb 2010
Location: Nicaragua
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think that you have may have the post_table since that query can't delete it, just check the DB tables and look if is there. If you haven't phpMyAdmin access you can grab a tool for handle your DB externally (a php script).

Now I don't think that this is caused by a mod but can be a reason so, remember wich mods do you have installed, also add this line in the config.php to disable all the hooks:
Code:
define('DISABLE_HOOKS', 1);
Just simple tips that can help you.
Reply With Quote
  #7  
Old 06-17-2010, 12:03 AM
MadK's Avatar
MadK MadK is offline
 
Join Date: Feb 2008
Location: Canada
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey there guys, thanks for the help but since it was an Internal Server Error (which I forgot to mention at the very beginning of this post), I had it fixed by my webhost who also said that it was a mistake on their part.

However, for some reason, I still cannot explain the origin of this MySQL error because the post table never existed, it was actually forums_post but oh well, if it works, it works!
Reply With Quote
  #8  
Old 06-17-2010, 12:39 AM
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
Posts: 3,085
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MadK View Post
I had it fixed by my webhost who also said that it was a mistake on their part.
Glad to hear you recovered it.

Just so we can say "nyah nyah" to Marco, can we be assured that you are making daily db backups?
Reply With Quote
  #9  
Old 06-18-2010, 07:11 PM
MadK's Avatar
MadK MadK is offline
 
Join Date: Feb 2008
Location: Canada
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Videx View Post
Glad to hear you recovered it.

Just so we can say "nyah nyah" to Marco, can we be assured that you are making daily db backups?
Concerning the last few posts, I'll be honest with you! Before last year, I did not have the habit of making daily backups or even backups before I would modify the system. Ever since I lost my database because of you could say, ''reckless administration'' I make daily backups!

Had to learn the hard way, like many others, I am pretty sure!


Thanks for the help everybody, I truly appreciate it,
I wish you all true success in all of your projects,
MadK
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04409 seconds
  • Memory Usage 2,249KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete