FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » fatal error upgrading to 3.02
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
fatal error upgrading to 3.02 [message #165522] Sun, 10 July 2011 14:37 Go to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
I took a backup first Smile

I upgraded from 2.7.7 to 3.0.0, ran consistency checker, logged into forum, all looked ok

I started an upgrade to 3.0.2. It failed with:

Fatal error: Uncaught exception 'Exception' with message '1068: Multiple primary key defined @ ALTER IGNORE TABLE fud_index ADD PRIMARY KEY (word_id,msg_id)' in /usr/www/users/myname/web/nvug/forum/upgrade.php:99 Stack trace: #0 /usr/www/users/myname/web/nvug/FUDforum/sql/mysql/db.inc(72): fud_sql_error_handler('ALTER IGNORE TA...', 'Multiple primar...', 1068, '5.0.45-log') #1 /usr/www/users/myname/web/nvug/FUDforum/include/dbadmin.inc(225): q('ALTER IGNORE TA...') #2 /usr/www/users/myname/web/nvug/forum/upgrade.php(911): create_primary_key('fud_index', 'word_id,msg_id') #3 {main} thrown in /usr/www/users/myname/web/nvug/forum/upgrade.php on line 99


I restarted it a couple of times, but it failed at same point.

Looked at table fud_index and it did indeed have a primary key already, on id. fud seems to be wanting to change that to something else, so I deleted the primary key on id and ran the upgrade again - failed at same point.

So I put the primary key back on id (using heidisql) and commented out line 911 in upgrade.php and then it completed OK.

Currently the consistency checker is running - it has been running much longer than usual and it at the stage of 'Checking search indexes'. Not sure whether it has hung, or whether it is just doing a large task (fud_index is 7million rows, 300Mb).

Why the above error?

What should I do to fix it?

Does it matter that I commented out that index update...




Simon Child

[Updated on: Sun, 10 July 2011 14:46]

Report message to a moderator

Re: fatal error upgrading to 3.02 [message #165523 is a reply to message #165522] Sun, 10 July 2011 14:54 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Let it run, the consistency checker is a bit more involved in 3.0.2. On the upside, it will likely reduce the size of your DB.

I'll look at the error later.
Re: fatal error upgrading to 3.02 [message #165524 is a reply to message #165523] Sun, 10 July 2011 15:06 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The upgrade script is supposed to remove the 'id' column completely. Try to remove it manually and re-run the upgrade script.

PS: The table structure is documented at fud30_index.
Re: fatal error upgrading to 3.02 [message #165525 is a reply to message #165524] Sun, 10 July 2011 16:05 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
Thanks for that. I'd already aborted and started restoring from backup (into a different database and directory), but have now aborted the restore and instead trying the upgrade again.

Have removed the id column with heidisql (looks like I didn't actually remove the key before, though I thought I had) and now upgrade is rebuilding the composite index and I'll let it run.

What prompted me to restore was that after aborting the slow consistency check, my forum looked OK except it showed no posts - it showed a pager for each form, but no actual posts. But perhaps they will all come back once the consistency check completes...


Simon Child
Re: fatal error upgrading to 3.02 [message #165526 is a reply to message #165525] Sun, 10 July 2011 16:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
srchild wrote:
What prompted me to restore was that after aborting the slow consistency check, ...


You may need to increase MySQL's "key_buffer_size". Check the notes about it at FUDforum 3.0.2.

srchild wrote:
...my forum looked OK except it showed no posts - it showed a pager for each form, but no actual posts. But perhaps they will all come back once the consistency check completes...


Yes, they will re-appear after the consistency check.
Re: fatal error upgrading to 3.02 [message #165527 is a reply to message #165525] Sun, 10 July 2011 16:24 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
Same problem again further down - got past fud_index then hit:

Fatal error: Uncaught exception 'Exception' with message '1068: Multiple primary key defined @ ALTER IGNORE TABLE fud_thread_notify ADD PRIMARY KEY (user_id,thread_id)' in /usr/www/users/myname/web/nvug/forum/upgrade.php:99 Stack trace: #0 /usr/www/users/myname/web/nvug/FUDforum/sql/mysql/db.inc(75): fud_sql_error_handler('ALTER IGNORE TA...', 'Multiple primar...', 1068, '5.0.45-log') #1 /usr/www/users/myname/web/nvug/FUDforum/include/dbadmin.inc(225): q('ALTER IGNORE TA...') #2 /usr/www/users/myname/web/nvug/forum/upgrade.php(911): create_primary_key('fud_thread_noti...', 'user_id,thread_...') #3 {main} thrown in /usr/www/users/myname/web/nvug/forum/upgrade.php on line 99



Simon Child
Re: fatal error upgrading to 3.02 [message #165528 is a reply to message #165527] Sun, 10 July 2011 16:41 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Strange! You may need to remove all the redundant columns yourself. Drop the 'id' column on fud_thread_notify.
Re: fatal error upgrading to 3.02 [message #165529 is a reply to message #165528] Sun, 10 July 2011 16:46 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
And next...
Fatal error: Uncaught exception 'Exception' with message '1068: Multiple primary key defined @ ALTER IGNORE TABLE fud_title_index ADD PRIMARY KEY (word_id,msg_id)' in /usr/www/users/myname/web/nvug/forum/upgrade.php:99 Stack trace: #0 /usr/www/users/myname/web/nvug/FUDforum/sql/mysql/db.inc(75): fud_sql_error_handler('ALTER IGNORE TA...', 'Multiple primar...', 1068, '5.0.45-log') #1 /usr/www/users/myname/web/nvug/FUDforum/include/dbadmin.inc(225): q('ALTER IGNORE TA...') #2 /usr/www/users/myname/web/nvug/forum/upgrade.php(911): create_primary_key('fud_title_index', 'word_id,msg_id') #3 {main} thrown in /usr/www/users/myname/web/nvug/forum/upgrade.php on line 99


Simon Child
Re: fatal error upgrading to 3.02 [message #165530 is a reply to message #165529] Sun, 10 July 2011 16:48 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Same, drop 'id' on fud_title_index.
Re: fatal error upgrading to 3.02 [message #165531 is a reply to message #165529] Sun, 10 July 2011 16:50 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member

The only 'non-standard' thing that I am doing, is ticking the box 'Have you manually modified FUDforum's SQL structure? (leave unchecked if unsure)' because I have added a couple of columns to fud_users.

Next:

Fatal error: Uncaught exception 'Exception' with message '1068: Multiple primary key defined @ ALTER IGNORE TABLE fud_bookmarks ADD PRIMARY KEY (user_id,thread_id)' in /usr/www/users/myname/web/nvug/forum/upgrade.php:99 Stack trace: #0 /usr/www/users/myname/web/nvug/FUDforum/sql/mysql/db.inc(75): fud_sql_error_handler('ALTER IGNORE TA...', 'Multiple primar...', 1068, '5.0.45-log') #1 /usr/www/users/myname/web/nvug/FUDforum/include/dbadmin.inc(225): q('ALTER IGNORE TA...') #2 /usr/www/users/myname/web/nvug/forum/upgrade.php(911): create_primary_key('fud_bookmarks', 'user_id,thread_...') #3 {main} thrown in /usr/www/users/myname/web/nvug/forum/upgrade.php on line 99



Simon Child
Re: fatal error upgrading to 3.02 [message #165532 is a reply to message #165531] Sun, 10 July 2011 16:54 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
Got through the upgrade now and consistency checker is running - now doing the slow stage of 'Checking search indexes' but will let it run this time.



Simon Child
Re: fatal error upgrading to 3.02 [message #165533 is a reply to message #165531] Sun, 10 July 2011 16:55 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yes, drop id on fud_bookmarks.

That explains why the upgrade script doesn't drop columns.
Re: fatal error upgrading to 3.02 [message #165534 is a reply to message #165532] Sun, 10 July 2011 16:56 Go to previous messageGo to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member

Finished, posts are back, will check it over now. Thanks for the help.


Simon Child
Re: fatal error upgrading to 3.02 [message #165537 is a reply to message #165534] Mon, 11 July 2011 00:38 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
There may be some other columns you need to drop as well. Look for messages like:

"Unused database column ... Unless you've added it, it should be dropped!"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Anonymous user's id must be 1
Next Topic: maillist.php not working
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:11:02 GMT 2024

Total time taken to generate the page: 0.02857 seconds