_bbsearch_wordlist indexes error on upgrade
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexInstallation Issues
Author Message
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 5:03 pm
Reply with quote

It worked for me with a bit modified code like this:
PHP:
<?php

require_once('includes/cmsinit.inc');
require_once(
BASEDIR.'includes/classes/security.php');
require_once(
BASEDIR.'includes/classes/cpg_member.php');

global
$db, $prefix;
define('IN_PHPBB', true);

define('SEARCH_WORD_TABLE', $prefix.'_bbsearch_wordlist');
define('SEARCH_MATCH_TABLE', $prefix.'_bbsearch_wordmatch');
include(
'includes/phpBB/functions_search.php');

$total_topics = 'SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total FROM '.$prefix.'_bbforums';

$result = $db->sql_query('SELECT post_id, post_text, post_subject from '.$prefix.'_bbposts_text order by post_id');

while(
$row = $db->sql_fetchrow($result)) {
$total_topics++;
add_search_words('global', $row['post_id'], $row['post_text'], $row['post_subject']);
}

echo
'Finished - please delete this file';
?>

I also checked for example a word from my before upgrade to 9.2.1 backup with word_id 0 and it really has a proper id now!

Nice, it worked!


Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 5:44 pm
Reply with quote

SHOW INDEXES FROM nuke_bbsearch_wordlist

results from new db post (failed) upgrade:

Code:
Full Texts
Table 	Non_unique 	Key_name 	Seq_in_index 	Column_name 	Collation 	Cardinality 	Sub_part 	Packed 	Null 	Index_type 	Comment
nuke_bbsearch_wordlist 	0 	PRIMARY 	1 	word_text 	A 	6150 	NULL 	NULL 	  	BTREE 	 
nuke_bbsearch_wordlist 	1 	word_id 	1 	word_id 	A 	NULL 	NULL 	NULL 	  	BTREE 	 

The update was being done on localhost with MySQL5 and PHP5. Site normally runs on MySQL5.0.45-community (recent upgrade from MySQL4 by ISP on 12/27/07) and PHP4.4.7.

SQL file had to go through a collation update on localhost to be able to run installer at all.

SHOW INDEXES FROM nuke_bbsearch_wordlist

from original file pre collation update and pre install/upgrade attempt gives same results:

Code:
Table 	Non_unique 	Key_name 	Seq_in_index 	Column_name 	Collation 	Cardinality 	Sub_part 	Packed 	Null 	Index_type 	Comment
nuke_bbsearch_wordlist 	0 	PRIMARY 	1 	word_text 	A 	6150 	NULL 	NULL 	  	BTREE 	 
nuke_bbsearch_wordlist 	1 	word_id 	1 	word_id 	A 	NULL 	NULL 	NULL 	  	BTREE 	 

_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
BrokenCrust
500+ Posts Club


Joined: Sep 06, 2004
Posts: 503

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 6:19 pm
Reply with quote

I am getting the same error (on a MySQL 5.0 database) for a 9.0.6.1. upgrade. (php 5.2).

Code:
On /install.php
While executing query "ALTER TABLE bc_bbsearch_wordlist DROP INDEX word_id"

the following error occured: Incorrect table definition; there can be only one auto column and it must be defined as a key

In: C:\web\html\includes\classes\installer.php on line: 125

Code:
Table  	Non_unique  	Key_name  	Seq_in_index  	Column_name  	Collation  	Cardinality  	Sub_part  	Packed  	Null  	Index_type  	Comment
bc_bbsearch_wordlist 	0 	PRIMARY 	1 	word_text 	A 	6179 				BTREE 	
bc_bbsearch_wordlist 	1 	word_id 	1 	word_id 	A 	6179 				BTREE 	


BrokenCrust's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.17/5.0.91/5.2.16/9.2.1
Back to top
View user's profile
ConViCt
Nice poster


Joined: Jun 18, 2004
Posts: 114
Location: Canada

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 6:35 pm
Reply with quote

This is also happening to me:

PHP:
While executing query "ALTER TABLE nuke_bbsearch_wordlist DROP INDEX word_id"

the following error occured: Incorrect table definition; there can be only one auto column and it must be defined as a key

In
: /usr/local/psa/home/vhosts/xxxx/httpdocs/includes/classes/installer.php on line: 125

Ran the query and got this:

Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
nuke_bbsearch_wordlist 0 PRIMARY 1 word_text A 91883 NULL NULL BTREE
nuke_bbsearch_wordlist 1 word_id 1 word_id A 91883 NULL NULL BTREE


MySQL 4.1.11 and PHP Version 4.4.8


ConViCt's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD 4.9/MySQL 4.1.11/PHP Version 4.4.8/DragonFly 9.2.1
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:02 pm
Reply with quote

I see why you have this issue, on 2006/01/26 was made a change in the indexes and the installer will be ready to handle such case within 24 hours.

Any version prior 9.1.0.1 were the installer never been there will have the same error, new 9.1+ or any upgrade to 9.1+ up will be just fine.

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:05 pm
Reply with quote

Will the installer recreate wordlist then during the upgrade process?

Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:12 pm
Reply with quote

The whole word list? like IDs and text?
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:15 pm
Reply with quote

Yep. I know it would be probably too heavy job for big forums.
However, if same problem exists like I had, that the word_id's were 0, then it would be a good investment for the future, I guess, to make that heavy job. Maybe splitted somehow, so if something fails it doesn't have to start over.


Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:21 pm
Reply with quote

Eestlane, you still haven't told us whats your forums tables history. This will help us to understand why you are experiencing such a strange issue.
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
layingback
Forum Admin


Joined: Apr 19, 2004
Posts: 953

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:23 pm
Reply with quote

Thanks Nano for the quick response!
_________________
Pro_News: The complete module for Dragonfly - now available as version 3.3

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6 - 3.6 / 1.3.42 - 2.2.12 / 5.0.92 - 5.1.37 - 5.1.54 / 4.4.49 - 5.2.17 - 5.3 / 9.2.1
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:23 pm
Reply with quote

Mhm, I started with 9.0.6.1, I guess.
Also maybe I have done some weird black magic with it previously, as I had some issues in past with upgrading because of double entries.
It might be mine problem specifically that I had word_id's with 0-s though, as if I understand correctly then the current error shows up even if the primary key isnt made right?


Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3678
Location: Melbourne, AU

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:29 pm
Reply with quote

PRIMARY KEYs are there, always been there and they will rebuilt properly - I only need to tune up the query execution order.

If you do have 0s in word id, then you do not have the an UNIQUE or PRIMARY index for word_id, or probably you forgot to add indexes back on your table.

Run and report here:
SHOW INDEXES FROM tablename;

_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Thu Feb 07, 2008 10:31 pm
Reply with quote

Everything is fine now, but I didn't have indexes before. And I couldn't make them because of the same values of word_id's.

But, again, everything seems to be fine now.


Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
LankaBoard
Newbie


Joined: Feb 04, 2008
Posts: 41

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Wed Feb 13, 2008 4:44 pm
Reply with quote

i didnt have any problem on upgrading from 9.1.2.1 to 9.2.1, but my mysql version is mysql5. my server can run both of versions mysql4 and mysql5. What is the best version for DF? if i change my server to another one thats only having mysql 4 databases, is it possible to import my old data base to new host (mysql4)or do i need to find a host which can run mysql5 databases?
_________________
Read Useful Articles www.readmyarticles.com

LankaBoard's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/1.3.33/5/5/9.2.1
Back to top
View user's profile Visit poster's website
Eestlane
I18N / L10N Lead Dev


Joined: Apr 06, 2005
Posts: 1406
Location: Estonia

PostPost subject: Re: _bbsearch_wordlist indexes error on upgrade
Posted: Wed Feb 13, 2008 4:46 pm
Reply with quote

Well, MySQL should be better for sure.

Eestlane's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.0.63/5.0.67/5.2.8/9.2.1
Back to top
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexInstallation Issues All times are GMT
Go to page Previous  1, 2, 3  Next
Page 2 of 3


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Dedicated Server & Bandwidth Sponsored by DedicatedNOW
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 1.8034 seconds with 16 DB Queries in 0.2808 seconds
Memory Usage: 3.05 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy