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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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 10:37 Go to next message
srchild is currently offline  srchild   United Kingdom
Messages: 88
Registered: December 2003
Location: UK
Karma: 1
Member
add to buddy list
ignore all messages by this user
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 10: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 10:54 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 11:06 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 12: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
add to buddy list
ignore all messages by this user
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 12:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 12: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
add to buddy list
ignore all messages by this user
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 12:41 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 12: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
add to buddy list
ignore all messages by this user
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 12:48 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 12: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
add to buddy list
ignore all messages by this user

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 12: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
add to buddy list
ignore all messages by this user
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 12:55 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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 12: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
add to buddy list
ignore all messages by this user

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] Sun, 10 July 2011 20:38 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3679
Registered: December 2004
Karma: 19
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
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!"
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Thu Sep 20 18:27:29 EDT 2018

Total time taken to generate the page: 0.00720 seconds