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

Michael Stucki michael at typo3.org
Sat Nov 8 18:59:29 CET 2008


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
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_9639_update_tables_trunk-r4434.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081108/31b28a6f/attachment.txt 


More information about the TYPO3-team-core mailing list