[TYPO3-core] RFC: Fix bug #9639: DB Analyzer / Compare Tool can't handle the upgrade of the cache tables

Martin Kutschker masi-no at spam-typo3.org
Tue Nov 11 22:23:10 CET 2008


Michael Stucki schrieb:
> Hi!
> 
> This is SVN patch request.
> 
> Type: bugfix
> 
> Branches: Trunk / TYPO3_4-2
> 
> BT reference: http://bugs.typo3.org/view.php?id=9639
> 
> Problem:
> When changing the SQL-definitions of cache_hash and cache_pagesection,
> the updater will always fail.
> 
> There are two reasons for this:
> 1. The table must be cleared to make sure that the keys are unique. This
> is no problem for cache_* tables.
> 2. auto_increment must be set _after_ the primary key was created.
> However, the primary key can only be created if the field already
> exists. So the field must be created in two steps (first without the
> "auto_increment" option).
> 
> Solution:
> Attached is a patch that fixes both issues. However it will require to
> go through the update twice:

why?

> 1st step:
> - Remove all fields which are no longer used (drop them really, not just
> rename)

Would it technically be sufficient to remove all indices these fields
and to drop the autoincrement on uid before performing any other changes
to the table?

Masi


More information about the TYPO3-team-core mailing list