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

Steffen Kamper info at sk-typo3.de
Tue Nov 11 23:09:24 CET 2008


Hi,

Martin Kutschker schrieb:
> 
> 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

this sounds good to me. Important is the order of dropping
* drop indices
* alter field having auto_increment
* drop primary key
this should help, and the table can be modified in any way.

I tried what Michael said that you can't create a field with auto_increment.

 > 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.

So i went to table cache_hash filled with records (no truncate)
and did this:
ALTER TABLE `cache_hash` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY 
KEY FIRST ;

and it worked without a problem

So the problem must be in the way how the Compare tool generates the 
SQL-query. I'm not so in the code to make a patch now but may be this 
helps in finding a solution.

vg Steffen


More information about the TYPO3-team-core mailing list