Bug #63599
closedFresh TYPO3 7.0.0 install - Install tool - analyze database
0%
Description
Is it normal that after a fresh install of TYPO3 7.0.0 (I repeat: fresh, it means a completely new installation, without any distribution or package, no pages created, no filemount created, no typoscript template created, just the admin be-user created, with any extension installed apart from scheduler, linkvalidator and recycler), if I open the install tool and run the Analyze Database, I already have a lot of fixes that must be done on the db?
ALTER TABLE sys_file_processedfile DROP KEY combined_1; ALTER TABLE sys_file_processedfile ADD KEY combined_1 (original,task_type,configurationsha1); ALTER TABLE sys_file_processedfile DROP KEY identifier; ALTER TABLE sys_file_processedfile ADD KEY identifier (storage,identifier(199)); 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 sys_domain DROP KEY getSysDomain; ALTER TABLE sys_domain ADD KEY getSysDomain (redirectTo,hidden); 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_typo3dbbackend_queries DROP KEY cache_id; ALTER TABLE cf_extbase_typo3dbbackend_queries ADD KEY cache_id (identifier,expires); ALTER TABLE cf_extbase_typo3dbbackend_queries_tags DROP KEY cache_id; ALTER TABLE cf_extbase_typo3dbbackend_queries_tags ADD KEY cache_id (identifier); ALTER TABLE cf_extbase_typo3dbbackend_queries_tags DROP KEY cache_tag; ALTER TABLE cf_extbase_typo3dbbackend_queries_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_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);
Files
Updated by Riccardo De Contardi almost 10 years ago
BTW: if I check all the fields and "execute" the update, nothing happens, the list of database changes to be performed remains the same
Updated by Mathias Schreiber almost 10 years ago
- Target version changed from 7.0 to 7.1 (Cleanup)
Updated by Mathias Schreiber almost 10 years ago
- Status changed from New to Needs Feedback
- Assignee set to Mathias Schreiber
Is it possible that you run mysql in strict mode, deny a certain table type or something alike?
If we take a look at the code you supplied it is always the same thing going on:
- It finds an index with name X
- it wants to drop the index
- it wants to re-generate the index
This normally happens when the MySQL Server returns a string different from what TYPO3 expects.
We can go into a 1:1 debug session on Slack if you like, because right now no-one in the team can reproduce the error
Updated by Riccardo De Contardi almost 10 years ago
Hi thank you for your reply. I will gladly be of help...how can I be of help? How can I check if I am on STRICT mode? (I'm using a MAMP enviroment just now).
If it is of help, after starting Mysql, this is the error log:
150111 15:09:16 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql 150111 15:09:17 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 150111 15:09:17 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive 150111 15:09:17 [Note] Plugin 'FEDERATED' is disabled. 150111 15:09:17 InnoDB: The InnoDB memory heap is disabled 150111 15:09:17 InnoDB: Mutexes and rw_locks use GCC atomic builtins 150111 15:09:17 InnoDB: Compressed tables use zlib 1.2.3 150111 15:09:17 InnoDB: Initializing buffer pool, size = 128.0M 150111 15:09:17 InnoDB: Completed initialization of buffer pool 150111 15:09:17 InnoDB: highest supported file format is Barracuda. 150111 15:09:21 InnoDB: Waiting for the background threads to start 150111 15:09:22 InnoDB: 5.5.33 started; log sequence number 1467896902
Executing the query does not trigger anything in the log.
Updated by Mathias Schreiber almost 10 years ago
Does the same error occur in 6.2.x installs too?
And maybe 4.5?
If you could check that, that'd be awesome.
Updated by Riccardo De Contardi almost 10 years ago
I am sure it does not occur in 6.2.x; cannot check in 4.5 sorry
Updated by Mathias Schreiber almost 10 years ago
Please try the following:
- open typo3/sysext/core/ext_tables.sql
- go to line 383 (or search for "combined_1")
- add spaces after the commas in the brackets
Check again in the install tool.
Updated by Riccardo De Contardi almost 10 years ago
Before:
KEY combined_1 (original,task_type,configurationsha1),
After:
KEY combined_1 (original, task_type, configurationsha1),
I run the install tool > compare db but no... nothing happens: performing the update nothing changes; the only difference is the line:
ALTER TABLE sys_file_processedfile ADD KEY combined_1 (original, task_type, configurationsha1);
with spaces. The enviroment in which the error occurs is a MAMP enviroment (PHP 5.5.3. Mysql 5.5.33)
I've done another test on a Windows enviroment WAMP (PHP 5.5.12, Mysql 5.6.17) and here the error does not occur. After performing the changes in ext_tables.sql
ALTER TABLE sys_file_processedfile DROP KEY combined_1; ALTER TABLE sys_file_processedfile ADD KEY combined_1 (original, task_type, configurationsha1);
Updated by Mathias Schreiber almost 10 years ago
Ok, I think the problem might be here somehow:
typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php
Function: getFieldDefinitions_database()
Can you debug $total['sys_file_processedfile']['keys'] here?
I still think that your MAMP returns something different than what TYPO3 expects ;-)
Updated by Riccardo De Contardi almost 10 years ago
@Mathias Schreiber
I'd want to thank you very much for your time; can you guide me about how to do the debug? Alas, I'm not a programmer ;) something like "for dummies" ;)?
Updated by Mathias Schreiber almost 10 years ago
no problem.
we'll just to the "rambo" way of doing things.
At the end of the function it says "return $total;".
add two lines on top of that:
var_dump($total['sys_file_processedfile']['keys'] ); die();
The die() will exit the script immediately, so make sure to comment out this two lines later :)
Updated by Riccardo De Contardi almost 10 years ago
ok, I like the "Rambo" way ;)
Added the lines after "//RDC"
public function getFieldDefinitions_database() { [.....] // Compile key information: if (count($tempKeys)) { foreach ($tempKeys as $table => $keyInf) { foreach ($keyInf as $kName => $index) { ksort($index); $total[$table]['keys'][$kName] = $tempKeysPrefix[$table][$kName] . ' (' . implode(',', $index) . ')'; } } } //RDC var_dump($total['sys_file_processedfile']['keys'] ); die(); return $total;
This is the result:
array(3) { ["PRIMARY"]=> string(17) "PRIMARY KEY (uid)" ["combined_1"]=> string(58) "KEY combined_1 (original,task_type(191),configurationsha1)" ["identifier"]=> string(40) "KEY identifier (storage,identifier(191))" }
Updated by Mathias Schreiber almost 10 years ago
ok, cool.
Do you see the difference?
Compare
YOURS: KEY combined_1 (original,task_type(191),configurationsha1) TYPO3: KEY combined_1 (original,task_type,configurationsha1)
Please try this in MySQL (phpMyAdmin or alike):
SHOW KEYS FROM sys_file_processedfile;
Updated by Riccardo De Contardi almost 10 years ago
- File Cattura_MAC.tiff Cattura_MAC.tiff added
- File Cattura_WINDOWS.PNG Cattura_WINDOWS.PNG added
Ok, I attach the screenshots from both enviroments:
cattura_WINDOWS = WAMP (no error)
cattura_MAC = MAMP (error)
Don't know where the "191" comes from :S :S
Updated by Mathias Schreiber almost 10 years ago
The column called "Sub_part" on your system returns a value where it should not.
Same goes in the last key... see that your windows install says 199, while your MAMP says 191.
I think this is mamp related and there is no way TYPO3 can deal with it :(
Updated by Riccardo De Contardi almost 10 years ago
so the correct value is "NULL"?
Apart from that, I don't like what happened because it is very difficult to trace such an error; I mean, even if I want to change it manually, it is not a good news if the enviroment makes the database not consistent (I hope I made myself clear)
The only thing I can test is the following: I don't remember if I created the empty DB via phpmyadmin and then choose it in the installation procedure or I had it created by TYPO3 itself during the installation.
If you think this could aid, I'll do this test removing the whole installation and creating everything again
Updated by Mathias Schreiber almost 10 years ago
Personally, I'd ignore the error on your local machine.
As you see this is what TYPO3 instructs your DB to do:
ALTER TABLE sys_file_processedfile ADD KEY combined_1 (original,task_type,configurationsha1);
The result is somewhat different from that instruction and TYPO3 can only check "did the DB do what I told it to do?"
One last thing you can try is to manually delete the key in PHPMyAdmin and then run the SQL statement above.
Maybe it shows an error or a warning.
Updated by Riccardo De Contardi almost 10 years ago
I have performed the following test:
1. drop the DB
2. create DB via phpmyadmin: db name: typo3.70.test.it, collation utf8_general_ci
3. Install TYPO3
4. SHOW KEYS FROM sys_file_processedfile; > result: cattura_MAC_fromphpmyadmin.tiff
5. the problem is not present
I also tried to let TYPO3 create the db, but the result is the same, and no problem is shown, even after installing system extensions.
BTW: when creating the DB from the installation procedure, I was not able to name the database with dots, I had to name it typo3_70_test_it
MORALE DELLA FAVOLA (yes, in italian): I don't know where it came from!!!!!!
so... closed as not reproducible?
Thank you for your patience
Updated by Mathias Schreiber almost 10 years ago
- Status changed from Needs Feedback to Closed
Riccardo De Contardi wrote:
I also tried to let TYPO3 create the db, but the result is the same, and no problem is shown, even after installing system extensions.
BTW: when creating the DB from the installation procedure, I was not able to name the database with dots, I had to name it typo3_70_test_it
Well, to be honest, that's not a good idea anyways.
Here's why:
The "." ist used as a delimiter for database.table.field.
So by using a . in the DB name will cause mysql to constantly check whether your SQL refers to a DB, a table or a field :)
MORALE DELLA FAVOLA (yes, in italian): I don't know where it came from!!!!!!
a volte basta perdere
I guess I will close this one down, but at least we keep it as a reference in case others have the same problem.
Updated by Joerg Kummer over 9 years ago
I run into same issue in production environment and solved it, by using "utf8_general_ci" instead of "utf8mb_general_ci" as collation, which was pre configured.
This makes the different for the "Sub_part" value beeing set to 199 what was expected by TYPO3 instead of 191, which was set, when creating tables with collation "utf8mb_general_ci".