Project

General

Profile

Actions

Bug #54848

closed

Important Actions - Endless DB-analyser alter table

Added by Thomas Skierlo over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2014-01-08
Due date:
% Done:

0%

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

Description

TYPO3 6.2.0beta3 (TYPO3.CMS-HEAD-6335a24) - fresh install (no upgrade)

Install tool's db-analyser change fields are shown endless:

ALTER TABLE sys_history DROP KEY recordident_1;
ALTER TABLE sys_history ADD KEY recordident_1 (tablename,recuid);
ALTER TABLE sys_history DROP KEY recordident_2;
ALTER TABLE sys_history ADD KEY recordident_2 (tablename,tstamp);
ALTER TABLE sys_refindex DROP KEY lookup_rec;
ALTER TABLE sys_refindex ADD KEY lookup_rec (tablename,recuid);
ALTER TABLE sys_refindex DROP KEY lookup_uid;
ALTER TABLE sys_refindex ADD KEY lookup_uid (ref_table,ref_uid);
ALTER TABLE sys_refindex DROP KEY lookup_string;
ALTER TABLE sys_refindex ADD KEY lookup_string (ref_string);
ALTER TABLE sys_category_record_mm DROP KEY uid_foreign_tablenames;
ALTER TABLE sys_category_record_mm ADD KEY uid_foreign_tablenames (uid_foreign,tablenames);
ALTER TABLE cf_cache_hash DROP KEY cache_id;
ALTER TABLE cf_cache_hash ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_cache_hash_tags DROP KEY cache_id;
ALTER TABLE cf_cache_hash_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_cache_hash_tags DROP KEY cache_tag;
ALTER TABLE cf_cache_hash_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_cache_pages DROP KEY cache_id;
ALTER TABLE cf_cache_pages ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_cache_pages_tags DROP KEY cache_id;
ALTER TABLE cf_cache_pages_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_cache_pages_tags DROP KEY cache_tag;
ALTER TABLE cf_cache_pages_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_cache_pagesection DROP KEY cache_id;
ALTER TABLE cf_cache_pagesection ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_cache_pagesection_tags DROP KEY cache_id;
ALTER TABLE cf_cache_pagesection_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_cache_pagesection_tags DROP KEY cache_tag;
ALTER TABLE cf_cache_pagesection_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_cache_rootline DROP KEY cache_id;
ALTER TABLE cf_cache_rootline ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_cache_rootline_tags DROP KEY cache_id;
ALTER TABLE cf_cache_rootline_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_cache_rootline_tags DROP KEY cache_tag;
ALTER TABLE cf_cache_rootline_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_extbase_reflection DROP KEY cache_id;
ALTER TABLE cf_extbase_reflection ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_extbase_reflection_tags DROP KEY cache_id;
ALTER TABLE cf_extbase_reflection_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_extbase_reflection_tags DROP KEY cache_tag;
ALTER TABLE cf_extbase_reflection_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_extbase_typo3dbbackend_tablecolumns DROP KEY cache_id;
ALTER TABLE cf_extbase_typo3dbbackend_tablecolumns ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_extbase_typo3dbbackend_tablecolumns_tags DROP KEY cache_id;
ALTER TABLE cf_extbase_typo3dbbackend_tablecolumns_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_extbase_typo3dbbackend_tablecolumns_tags DROP KEY cache_tag;
ALTER TABLE cf_extbase_typo3dbbackend_tablecolumns_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_extbase_datamapfactory_datamap DROP KEY cache_id;
ALTER TABLE cf_extbase_datamapfactory_datamap ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_extbase_datamapfactory_datamap_tags DROP KEY cache_id;
ALTER TABLE cf_extbase_datamapfactory_datamap_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_extbase_datamapfactory_datamap_tags DROP KEY cache_tag;
ALTER TABLE cf_extbase_datamapfactory_datamap_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_workspaces_cache DROP KEY cache_id;
ALTER TABLE cf_workspaces_cache ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_workspaces_cache_tags DROP KEY cache_id;
ALTER TABLE cf_workspaces_cache_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_workspaces_cache_tags DROP KEY cache_tag;
ALTER TABLE cf_workspaces_cache_tags ADD KEY cache_tag (tag);
ALTER TABLE cf_extbase_object DROP KEY cache_id;
ALTER TABLE cf_extbase_object ADD KEY cache_id (identifier,expires);
ALTER TABLE cf_extbase_object_tags DROP KEY cache_id;
ALTER TABLE cf_extbase_object_tags ADD KEY cache_id (identifier);
ALTER TABLE cf_extbase_object_tags DROP KEY cache_tag;
ALTER TABLE cf_extbase_object_tags ADD KEY cache_tag (tag); 

After first run db fields are changed, but message to change field is shown again (endless).

Actions #1

Updated by Markus Klein over 10 years ago

What MySQL version are you using?

Actions #2

Updated by Georg Ringer over 10 years ago

reproduceable with xampp & mysql 5.0.8

this should be easily fixable and IMO a problem with the preg_replace_callback in SqlSchemaMigrationService->getDatabaseExtra()

This is the output for one table


Array
(
    [diff] => Array
        (
            [keys] => Array
                (
                    [recordident_1] => KEY recordident_1 (tablename,recuid)
                    [recordident_2] => KEY recordident_2 (tablename,tstamp)
                )

        )

    [diff_currentValues] => Array
        (
            [keys] => Array
                (
                    [recordident_1] => KEY recordident_1 (tablename(191),recuid)
                    [recordident_2] => KEY recordident_2 (tablename(191),tstamp)
                )

        )

)

as you can see the keys are fine but the @diff_currentValues includes the length of the field.

However the comment in line 284 says

// Lowercase the field type to surround false-positive schema changes to be
// reported just because of different caseing of characters
// The regex does just trigger for the first word followed by round brackets
// that contain a length. It does not trigger for e.g. "PRIMARY KEY" because
// "PRIMARY KEY" is being returned from the DB in upper case.

but it seems the call after it is not fully correct.

Actions #3

Updated by Thomas Skierlo over 10 years ago

MySQL 5.5 on Ubuntu 12.04 Server

Actions #4

Updated by Thomas Skierlo over 10 years ago

This error seems to be gone with HEAD from today.

Actions #5

Updated by Mathias Schreiber over 9 years ago

  • Status changed from New to Closed

Closed due to user feedback.
If the problem still persists, please re-open this ticket.

Thanks

Actions #6

Updated by Dario Savella over 8 years ago

I am having the same problem after upgrading an old site from 4.5 to 6.2.15.

One database update is left and, despite the fact the the suggested changes are actually done, the upgrade step does not go away.

I am running OpenSUSE 13.2, PHP 5.3 (only because 4.5 wouldn't work otherwise) and MySQL 5.5.16).

Actions

Also available in: Atom PDF