vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Search button isn't working. (https://vborg.vbsupport.ru/showthread.php?t=289969)

MagicPID 10-31-2012 06:01 PM

Search button isn't working.
 
I have no idea what happened, this error appeared out of no where.

Happens when you try to search, any ideas?

Quote:

Database error in vBulletin 4.1.11:

Invalid SQL:

SELECT tagsearch.tagid, tag.tagtext, COUNT(*) AS searchcount
FROM tagsearch AS tagsearch
INNER JOIN tag AS tag ON (tagsearch.tagid = tag.tagid)
WHERE tagsearch.dateline > 1349117971
GROUP BY tagsearch.tagid, tag.tagtext
ORDER BY searchcount DESC
LIMIT 70;

MySQL Error : Incorrect key file for table 'tagsearch'; try to repair it
Error Number : 1034
Request Date : Wednesday, October 31st 2012 @ 10:59:31 PM
Error Date : Wednesday, October 31st 2012 @ 10:59:31 PM
Script : -----/forums/search.php
Referrer : -----
IP Address : -----
Username : -----
Classname : vB_Database
MySQL Version : 5.1.65-cll

Lynne 10-31-2012 07:28 PM

And did you do as the error suggests and try to repair the table?

MagicPID 11-04-2012 11:36 PM

Quote:

Originally Posted by Lynne (Post 2377362)
And did you do as the error suggests and try to repair the table?

Yes, I did. It said the table is corrupt

Lynne 11-05-2012 01:28 AM

3 ways to repair a database

===================
1. you need to upload tools.php from your vB zip file to your /admin directory and run this url

yourdomain.com/admin/tools.php

and click [Repair Tables]

2. or using mysqlcheck repair for 3.23.38 and above

i.e. in shell/telnet/ssh type while mysql is running and forum is CLOSED:

mysqlcheck -r -u mysqlusername -p databasename

3. or via myisamchk repair functions while mysql is shutdown/stopped in shell/telnet/ssh type :

myisamchk -r -u root -p databasename

option #3 most likely requires server and mysql root access to first stop mysql and then run myisamchk repair options.

If none of those work, you will need to contact your host for help.

MagicPID 11-10-2012 02:31 AM

The table is showing as 0kb, is there a way I can re-upload just this table?

Better yet, can I just remove the tag feature from search so it isn't an issue? If it is what I think it is (most searched tags) it isn't really used much.

Lynne 11-10-2012 02:54 PM

If you want, you may just delete the table and recreate it. The schema is in the /install/mysql-schema.php file.

MagicPID 11-10-2012 08:11 PM

Quote:

Originally Posted by Lynne (Post 2380003)
If you want, you may just delete the table and recreate it. The schema is in the /install/mysql-schema.php file.

I appreciate your help... I'm getting this error now

https://vborg.vbsupport.ru/external/2012/11/28.png

Lynne 11-10-2012 10:31 PM

You don't run that file. Open it and you will find the query to create the table.

MagicPID 11-11-2012 03:06 AM

Quote:

Originally Posted by Lynne (Post 2380124)
You don't run that file. Open it and you will find the query to create the table.

Ugh, I'm still having issues.

When I try re-creating the table using the query in mysql-schema.php I just keep getting a query error.

Lynne 11-11-2012 05:08 PM

And what is the exact query you are trying to run (please use the code tags)? And what is the exact error you are getting when running it? And do you have a table prefix defined in your config.php file?

MagicPID 11-11-2012 07:44 PM

No, I don't have a prefix.


I wasn't sure exactly what exactly to run so I tried different variations and just parts of this, but none of them work. It always says syntax error.

Code:

$schema['CREATE']['query']['tagsearch'] = "
CREATE TABLE " . TABLE_PREFIX . "tagsearch (
        tagid INT UNSIGNED NOT NULL DEFAULT '0',
        dateline INT UNSIGNED NOT NULL DEFAULT '0',
        KEY (tagid)
)
";
$schema['CREATE']['explain']['tagsearch'] = sprintf($vbphrase['create_table'], TABLE_PREFIX . "tagsearch");



// IMPORTANT!!!! Update the template_temp table in adminfunctions_template.php whenever this table is altered
$schema['CREATE']['query']['template'] = "
CREATE TABLE " . TABLE_PREFIX . "template (
        templateid INT UNSIGNED NOT NULL AUTO_INCREMENT,
        styleid SMALLINT NOT NULL DEFAULT '0',
        title VARCHAR(100) NOT NULL DEFAULT '',
        template MEDIUMTEXT,
        template_un MEDIUMTEXT,
        templatetype ENUM('template','stylevar','css','replacement') NOT NULL DEFAULT 'template',
        dateline INT UNSIGNED NOT NULL DEFAULT '0',
        username VARCHAR(100) NOT NULL DEFAULT '',
        version VARCHAR(30) NOT NULL DEFAULT '',
        product VARCHAR(25) NOT NULL DEFAULT '',
        mergestatus ENUM('none', 'merged', 'conflicted') NOT NULL DEFAULT 'none',
        PRIMARY KEY (templateid),
        UNIQUE KEY title (title, styleid, templatetype),
        KEY styleid (styleid)
)


Lynne 11-12-2012 01:07 AM

You are putting that entire text into the query area? You need to only enter the actual query.

Code:

CREATE TABLE tagsearch (
        tagid INT UNSIGNED NOT NULL DEFAULT '0',
        dateline INT UNSIGNED NOT NULL DEFAULT '0',
        KEY (tagid)
)


MagicPID 11-12-2012 07:47 PM

Quote:

Originally Posted by Lynne (Post 2380405)
You are putting that entire text into the query area? You need to only enter the actual query.

Code:

CREATE TABLE tagsearch (
        tagid INT UNSIGNED NOT NULL DEFAULT '0',
        dateline INT UNSIGNED NOT NULL DEFAULT '0',
        KEY (tagid)
)


Thank you so much, I appreciate it.

Everything is working again.


All times are GMT. The time now is 04:47 PM.

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.05812 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete