[TYPO3-core] RFC: Fix bug #9639: DB Analyzer / Compare Tool can't handle the upgrade of the cache tables
Jeff Segars
jsegars at alumni.rice.edu
Tue Nov 11 17:04:17 CET 2008
Michael Stucki wrote:
> 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:
> 1st step:
> - Remove all fields which are no longer used (drop them really, not just
> rename)
> - Clear cache_* and index_* tables which are going to be modified
> - Create new fields (without "auto_increment" option)
> - Create keys
>
> 2nd step:
> - Add "auto_increment" option
>
> Regards
+1 based on testing.
Side Note: I'm a little concerned about the usability of going through
the updater twice and wondering whether truncate not being selected by
default will cause users to skip over it. I'm not sure what the solution
would be and its still an important fix to the existing behavior so we
can always address it later if it turns out to be a problem in the alphas.
Thanks!
Jeff
More information about the TYPO3-team-core
mailing list