Bug #82023
closedInstall Tool DB Analyzer tries to change all VARCHAR fields
0%
Description
Hi developers,
I'm experiencing an issue with DB Migrations in Install Tool - the analyzer complains every time about all varchar
fields. E.g.:
ALTER TABLE `be_groups` CHANGE `title` `title` VARCHAR(50) DEFAULT '' NOT NULL Current value: title VARCHAR(50) DEFAULT '''' NOT NULL COLLATE utf8_unicode_ci ALTER TABLE `be_groups` CHANGE `allowed_languages` `allowed_languages` VARCHAR(255) DEFAULT '' NOT NULL Current value: allowed_languages VARCHAR(255) DEFAULT '''' NOT NULL COLLATE utf8_unicode_ci ALTER TABLE `be_groups` CHANGE `pagetypes_select` `pagetypes_select` VARCHAR(255) DEFAULT '' NOT NULL Current value: pagetypes_select VARCHAR(255) DEFAULT '''' NOT NULL COLLATE utf8_unicode_ci ...
What I've also noticed: the reported DEFAULT value in DB consists of 4 quotes: ''''
, while proposed one contains two: ''
Altering table doesn't change anything, and I'm quite unsure how to fix this.
TYPO3 8.7.4
PHP 7.1
MariaDB 10.2.7
Updated by Hans Höchtl over 7 years ago
Same here, I posted it on Stackoverflow: [[https://stackoverflow.com/questions/45737730/typo3-lists-all-tables-in-db-compare-because-of-collate]].
I think it could be the collation, not the quotes.
Updated by Aleksandar Dimitrov over 7 years ago
I was able to reproduce this with 8.7.4 and 8.7.3, and mariadb 10.2.x and 5.x, on clean installs via the Install tool.
My guess is that a strict string comparison of ''
with ''''
causes the problem.
I think the serialisation of the 'original' column definition is buggy. Note the following case:
ALTER TABLE `tt_content` CHANGE `table_caption` `table_caption` VARCHAR(255) DEFAULT NULL Current value: table_caption VARCHAR(255) DEFAULT 'NULL' COLLATE utf8_unicode_ci
'NULL'
is in quotes here, and most definitely should not be, as NULL
and 'NULL'
are very different things for any SQL server. Some aggressive string escaping maybe?
Updated by Morton Jonuschat over 7 years ago
- Status changed from New to On Hold
MariaDB implemented a change to the Information Schema COLUMNS table which changed the output format compared to the original (Oracle) MySQL: https://jira.mariadb.org/browse/MDEV-13132
There is ongoing work in the upstream Doctrine DBAL repository on how to fix this: https://github.com/doctrine/dbal/pull/2825
At this time TYPO3 is not compatible with MariaDB >= 10.2.7 and given that the fix is happening deeply in the upstream Doctrine DBAL stack there is little we can do to work around it at this point in time.
Updated by Benni Mack about 7 years ago
- Status changed from On Hold to Rejected
So, the only thing TYPO3 can do, is wait for the Doctrine DBAL fix, and once this is done we can upgrade our dependency.
Updated by Georg Ringer about 7 years ago
- Has duplicate Bug #83046: sys_file_collection and tt_content could not be created added
Updated by Georg Ringer about 7 years ago
the PR https://github.com/doctrine/dbal/pull/2825 has been merged yesterday, so lets see when a release is done
Updated by Thomas Böhm over 6 years ago
Has this problem been solved? I just installed a fresh typo3 8.7.19 on mariadb 10.2.17 and still have this problem. Or is it solved in mariadb 10.3? Downgrading to 10.1 is not an easy option for me as there are other databases already on that server.
Updated by Jan Kiesewetter over 6 years ago
TYPO3 8.7 has dbal 2.5.10 locked atm.
https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/composer.lock#L339-L345
and installs maximum v2.5.13.
MariaDB 10.2 support came with doctrine/dbal 2.7.0
https://github.com/doctrine/dbal/releases/tag/v2.7.0
So this is fixed for master and TYPO3 ^9.3 but not for 8.7.
Updated by Georg Ringer about 6 years ago
Some final words: This won't be solved as doctrine dbal 2.7.0 requires php 7.1 which doesn't fit to the min. requirements of TYPO3 8.7 which got php 7.0.
Updated by Jan Kiesewetter about 6 years ago
As PHP 7.0 is EOL by 3 Dec 2018 http://php.net/supported-versions.php, maybe TYPO3 8.7 could raise requirements after that?
Updated by Thomas Oliver Moll about 6 years ago
- Priority changed from Should have to Must have
Jan Kiesewetter wrote:
As PHP 7.0 is EOL by 3 Dec 2018 http://php.net/supported-versions.php, maybe TYPO3 8.7 could raise requirements after that?
This Problem is still present with PHP 7.0 dead for a month now and TYPO3 8.7 still in support for quite some time clinging to the PHP 7.0 requirement doesn't make much sense now.
Updated by Arne Bracht over 5 years ago
Hello,
I changed /vendor/doctrine/dbal with the dbal 2.7.2 from here: https://www.doctrine-project.org/projects/dbal/2.7.html within TYPO3 8.7. I think that it worked. Should it be so simple?
I hope it could be integrated in the next TYPO3 8.7.x update. Yes I know it change the PHP requirements from PHP 7.0 to PHP 7.1. But why not? PHP 7.0 is EOL by 3 Dec 2018. And so TYPO3 8.7.27 <= php 7.0 and TYPO3 8.7.28 >= PHP 7.1 should be easily to make a notice in the requirements list and update notice.
Thanks
Updated by Lioh Moeller over 5 years ago
Why has this issue been marked as 'rejected'? We still face it with current typo3 version 9.5.9 and still 8.7.x in combination with MariaDB 10.3.
Updated by Pascal Naujoks almost 5 years ago
- PHP Version changed from 7.1 to 7.4
Also exists with PHP Version 7.4.4 and 10.4.12-MariaDB-1:10.4.12+maria~stretch on TYPO3 8.7.31
Example of fields that want to be updated but can't:
ALTER TABLE `be_groups` CHANGE `title` `title` VARCHAR(50) DEFAULT '' NOT NULL
Current value: title VARCHAR(50) DEFAULT '''' NOT NULL COLLATE utf8_general_ci
ALTER TABLE `be_groups` CHANGE `allowed_languages` `allowed_languages` VARCHAR(255) DEFAULT '' NOT NULL
Current value: allowed_languages VARCHAR(255) DEFAULT '''' NOT NULL COLLATE utf8_general_ci
ALTER TABLE `be_groups` CHANGE `pagetypes_select` `pagetypes_select` VARCHAR(255) DEFAULT '' NOT NULL
Current value: pagetypes_select VARCHAR(255) DEFAULT '''' NOT NULL COLLATE utf8_general_ci
ALTER TABLE `be_groups` CHANGE `description` `description` VARCHAR(2000) DEFAULT '' NOT NULL
Current value: description VARCHAR(2000) DEFAULT '''' NOT NULL COLLATE utf8_general_ci
...
Updated by Richard no-lastname-given over 4 years ago
- PHP Version changed from 7.4 to 7.2
Updated by Richard no-lastname-given over 4 years ago
- PHP Version changed from 7.2 to 7.1
Updated by Richard no-lastname-given over 4 years ago
I can confirm this issue on TYPO3 CMS 8.7.32, PHP 7.2 and MariaDB 10.2.8. My client bought ELTS for security updates. Buying ELTS for security reasons and at the same time not being able to update to MariaDB 10.2 is an issue because support for MariaDB 10.1 will be dropped in October 2020.
Updated by Tim Spiekerkötter over 4 years ago
Hey everyone,
is there anything we can do in this scenario? We have this problem with a ELTS installation as well. SLES MariaDB 10.2 and PHP 7.2.
Are there any other known problems with MariaDB 10.2 and TYPO3 8.7? I am thinking about building a workaround into the install tool for this exact case, has anyone done this before?
Updated by Yurii Panchenko over 4 years ago
Tim Spiekerkötter wrote:
Hey everyone,
is there anything we can do in this scenario? We have this problem with a ELTS installation as well. SLES MariaDB 10.2 and PHP 7.2.
Are there any other known problems with MariaDB 10.2 and TYPO3 8.7? I am thinking about building a workaround into the install tool for this exact case, has anyone done this before?
I was migrating the database to typo3 v10 (php7.4, mysql 5.7). I had an error with the field:
`seo_title` varchar (255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ',
I did this and the error went away:
1) Made a new empty field
`seo_title_temp` varchar (255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ',
2) Copied information excluding NULL
UPDATE `pages` SET `seo_title_temp` = `seo_title` WHERE `seo_title` IS NOT NULL
3) Removed `seo_title`
4) Renamed `seo_title_temp` to `seo_title`
There is no more error)))
Updated by Tomas Norre Mikkelsen almost 4 years ago
I'm facing this issue with:
TYPO3 8.7 ELTS
MariaDB: 10.1.x
PHP: 7.2.x