Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility MATRIX is not correct causing MISMATCH WITH DATABASE errors #9285

Open
fcorluka opened this issue Sep 13, 2021 · 4 comments
Open
Labels
Area: Databases Issues & PRs related to all things regarding databases Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase

Comments

@fcorluka
Copy link

fcorluka commented Sep 13, 2021

In compatibility matrix some combinations are not correct, and when installed there are constant errors in SuiteCRM when trying R&R.
Problem is version of MYSQL 8. In this version INT can not be declared with value/size, so "int (11)" is not posible to create but many modules have this fileds, e.g. Cases, case_number.

This is causing a big list of SQL to execute but nothing is done.
In CRM everything works, but I can not be sure, when I have a real error because this list is to big to read it properly.
Also this means that at any point something greater can go wrong.

Tested on different version of SuiteCRM, all have this problem with MySQL 8.

Your Environment

  • SuiteCRM Version used: 7.10.32, 7.11
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 88
  • Environment name and version (e.g. MySQL, PHP 7): MySQL 8, PHP 7.4.3
  • Operating System and version (e.g Ubuntu 16.04):Ubuntu Server 20.4 LTS
@tsmgeek
Copy link
Contributor

tsmgeek commented Sep 14, 2021

Do you have strict mode enabled on MySQL, currently according to spec its deprecated and throws a warning but should still work.

Can you indicate specific SQL version you are using and confirm which DB manager you are using in config.php.

Maybe its actually failing due to warnings not being handled correctly.
Whichever way there is no point in having display length on TINYINT, SMALLINT, MEDIUMINT, INT or BIGINT which is why they ended up deprecating it with eventual view to make it fail.

https://dev.mysql.com/worklog/task/?id=13127

@tsmgeek tsmgeek added the Area: Databases Issues & PRs related to all things regarding databases label Sep 14, 2021
@tsmgeek
Copy link
Contributor

tsmgeek commented Sep 14, 2021

if ($ref['colType'] == 'int' && !empty($fieldDef['len'])) {
$ref['colType'] .= "(" . $fieldDef['len'] . ")";
}

if ($ref['colType'] == 'int' && !empty($fieldDef['len'])) {
$ref['colType'] .= "(" . $fieldDef['len'] . ")";
}

This code should be changed to ignore length on TINYINT, SMALLINT, MEDIUMINT, INT or BIGINT column types.
I do not think we need to worry on MySQL < 8.

@tsmgeek tsmgeek added the Type:Bug Bugs within the core SuiteCRM codebase label Sep 14, 2021
@fcorluka
Copy link
Author

Hi @tsmgeek ,
these are my settings. At this point I do not know if strict mode is enabled or not.
Thank you for the code and explanation, but this should be in CRM installation and core code months ago.

If it says that 7.10.30 is working with MySQL 8, then it should work out of the box. I tried using MariaDB (version 10.3) and did not get this error.

'dbconfig' =>
array (
'db_host_name' => 'localhost',
'db_host_instance' => 'SQLEXPRESS',
'db_user_name' => 'username',
'db_password' => 'password,
'db_name' => 'crm-710',
'db_type' => 'mysql',
'db_port' => '',
'db_manager' => 'MysqliManager',
'collation' => 'utf8_general_ci',
'charset' => 'utf8',
),

@johnM2401 johnM2401 added the Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds label Sep 15, 2021
@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/upgrade-to-7-12-1-some-dashlets-crash/83048/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Databases Issues & PRs related to all things regarding databases Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type:Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

4 participants