News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Upgrade to 2.0 failing at "Updating attachment data"

Started by archiebald, June 13, 2011, 11:01:52 PM

Previous topic - Next topic

archiebald

I am upgrading from 1.1.14 to 2.0 Final.

Have removed all mods, my forum runs with English, English-utf8, and Japanese-utf8.

I have a LOT of large attachments which (as far as I know) are all named in English single byte characters)

Three attempts at upgrade have all failed at the same point

Executing Database Changes, Executing: "Updating attachment data..." (12 of 42 - of this script)

Error is reported as

Error!
Data too long for column 'mime_type' at row 1

Overall Progress is 61%, Step Progress is 61%

Calculating attachment mime types: = 13.6%

Maybe I have some corruption in my database?

Help Please!!!!


archiebald

UPDATE

To prove a point, I went back to the start of the process.  Before upgrading, I deleted every attachment fom the database.  Now, I can upgrade with no issues except that I MUST have those attachments.

So, there is definitely a file in my attachments that is causing the issue.  The problem is I have over 3,500 attachments which are encrypted.  This forum MUST have those attachments, it is the whole reason for being.

Problem is, I do not know which one of the 3,500+ is causing the installer to trip up.

What I need is more debugging information while it is upgrading the attachments table with the column "mime_type"

Can anyone offer any insights please?

008Rohit

Did it show any debugging info regarding which specific attachment caused the problem?

I myself have upgraded my forum from SMF 2.0RC5 to 2.0 an hour ago without any issues. My forum has over 5.000 attachments.
TechTage Forum - Vintage Technology - on MDDHosting - CloudLinux & LiteSpeed Powered - MDDHosting Review

archiebald

#3
No it didn't - that is the problem.  If I knew it was one particular attachment causing the problem then I could live with deleting it or replacing it after the upgrade.

All I got was - Error!  Data too long for column 'mime_type' at row 1

When I checked the data table in MySQL Query Browser (I have a dedicated server), I found it contained all the rows but it was tripping up when trying to set up column "mime_type" which is new in SMF2.0.

When I look down the "mime_type" column in MySQL Query Browser, I see that the only files that get an entry are;

jpg - "image/jpeg"
bmp - "image/x-ms-bmp"

If I order the results for "fileext" + "id_attach" then there is no obvious point where the processing stops.  It skips a couple of images, then re-starts both on the bmp and jpg.

Many of the attachments are pdf, doc, xls etc so most do not have an entry in this column.

EDIT - I have added a screenshot to illustrate exactly what is happening.

archiebald

UPDATE

Something very wierd happened.

I tried modifying the file "upgrade_2-0_mysql_sql"  as follows;

mime_type VARCHAR(20) - change the field length to 30 or 40. My thinking was that if the field is longer, then I might avoid the error.

In every case, the install froze at - "Updating thumbnail attachments PNG...done"

Waited for 10~15 minutes and no response.  Tried it three times.

With the VARCHAR value set back at 20, it cleared into "Calculating attachment mime types" and then miraculously, managed to get through the rest of the install.

I have no idea how or why that should have happened.

imdave

I am also having similar problems upgrading to 2.0. The upgrade gets to 37% then stops at Executing: "Updating attachment data..." (12 of 42) and i get a error -
Error!
Server has not responded for 30 seconds. It may be worth waiting a little longer or otherwise please click here to try this step again.

Anyone got any advice on how to go about fixing this problem?

khamseen

Had the exact same problem at the same stage too, obviously a problem somewhere with the upgrade files that they need to address. I got around it by installing RC2 and upgrading my database to that, then installing 2.0 and upgrading to that. Luckily I still had the RC2 install and upgrade files on my PC from yonks ago when I'd upgraded our main forums. Only now bothering to upgrade our less used forums.
"In hope we find despair and in despair we find truth." - Myself

MrPrise

I have this issue too. Is there any update on it?

archiebald

Maybe I should have mentioned that I am on the following;

Windows 2003 Server
PHP 5.3.4
MySQL 5.07

As an aside, I installed Tiny Portal on the same installation and found that it also skipped creating or updating certain database columns altogether.  Weird though because only some were incorrect.

MrPrise

#9
I use Linux. As a workaround I upgraded my 1.1.2 to RC5, then to 2 and it worked.

MegaByte

Also having this problem upgrading 1.1.2 to 2.0. Ubuntu 9.10 MySQL 5.1.37 PHP 5.2.10

archiebald

Sorry I can't help those that are having troubles, except that I have changed the topic icon to not solved.  Altough I stumbled across a solution it seems that this is not a unique problem.

Illori

try this.

ETA2: I know why it happens on some upgrades. You may actually try this instead, too:
upgrade_2-0.sql
Code: [Select]
---# Adding file hash.
ALTER TABLE {$db_prefix}attachments
ADD COLUMN file_hash varchar(40) NOT NULL default '';
---#

Cut and move it before the previous step(s), somewhere like, before:
Code: [Select]
---# Populate the attachment extension.

Advertisement: