Bug #57002

SQL-Errors while Upgrading the database with Upgrade Wizard

Added by Sammy Baghdadi over 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2014-03-17
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hi,

i'm trying to update a TYPO3 6.1.7 to TYPO3 6.2.0beta7 with the Install Tool and the Upgrade Wizard. While performing the needed Database-Updates i get this error "SQL-ERROR: Specified key was too long; max key length is 1000 bytes" by executing the sql-command: "ALTER TABLE sys_file_processedfile CHANGE identifier identifier varchar(512) default ''; "

I also had a problem while the Upgrade Wizard want's to alter the table sys_file_processedfile and it's coloumn "identifier" which was set to 200. This Command was used: ALTER TABLE sys_file_processedfile ADD KEY identifier (storage,identifier(249)); . This is what i got: "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys"

I manually changed the lenght of the coloumn to 249 and it worked for me. But i guess theire is no need to check the lenght of the field in the alter command.

I guess here are some fixes needed.


Related issues

Related to TYPO3 Core - Bug #57805: SQL-ERROR: Specified key was too long Closed 2014-04-10
Duplicates TYPO3 Core - Bug #56786: Index on sys_file_processedfile is too large Closed 2014-03-11

Associated revisions

Revision ee9be36c (diff)
Added by Nicole Cordes over 5 years ago

[BUGFIX] Reduce length of identifier key in sys_file_processedfile

To support a smooth upgrade from a 6.0 or 6.1 system, we have to reduce
the length if the identifier field for the key "identifier".

Resolves: #57002
Releases: 6.2
Change-Id: Ic5928ceae1f288cfb3005ad271e493f356679c82
Reviewed-on: https://review.typo3.org/28622
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

History

#1 Updated by Markus Klein over 5 years ago

  • Status changed from New to Closed
  • Target version deleted (6.2.0)

Duplicates #56786

#2 Updated by Markus Klein over 5 years ago

  • Status changed from Closed to Needs Feedback

#3 Updated by Thorsten Bringewatt over 5 years ago

Hey,

I get the same error when trying to update a 4.5.32 TYPO3 installation to 6.2.0beta7.

I changed the symlink, went to the upgrade wizard and executed the step "Update database schema: Create tables and fields".

Update failed!
SQL-ERROR: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys

ALTER TABLE sys_file_processedfile ADD KEY identifier (storage,identifier(249));

#4 Updated by Markus Klein over 5 years ago

The question is why do we get a ALTER TABLE here?
The table does not exist when upgrading from 4.x

#5 Updated by Gerrit Code Review over 5 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28622

#6 Updated by Nicole Cordes over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Sammy Baghdadi over 5 years ago

The issue is on Line 371 in the file /typo3/sysext/core/ext_tables.sql. It is still present in the final TYPO3 6.2. I fixed it manually by changing the line from

identifier varchar(512) DEFAULT '' NOT NULL,

to

identifier varchar(256) DEFAULT '' NOT NULL,

Now it works for me.

#8 Updated by Paul A. Auwehla over 5 years ago

Update from fresh installed typo3 6.1.7 Government Packages
to 6.2: Same error message.
Update is impossible and stops at this point!

Patch from Sammy Baghdadi above resolves this isssue.
This fix into 6.2 is urgent.

#9 Updated by Markus Klein over 5 years ago

please do NOT post here anymore. This issue is closed as duplicate! See related issues above.

#10 Updated by Paul A. Auwehla over 5 years ago

The above mentioned
6.1.7 Government Packages in fact was the
6.1.7 Introduction Package

After the complete update to 6.2
the FE screen is blank, white and empty.
BE is working very good.

#11 Updated by Markus Klein over 5 years ago

@Paula: white screen = errors are not displayed.
Check the logs or enable displayErrors in the Install Tool

#12 Updated by Markus Klein over 5 years ago

We filed a new report for that problem: #57805

#13 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF