Debugging another issue in my mysql editor I got a lot of deprecation notices. This is because of
joomla-cms/installation/sql/mysql/base.sql
Lines 9 to 14 in 9ca4e56
Here you can see we are using the deprecated display width on all integers
Confusingly when it is a VARCHAR (50) it means a field width of 50 and therefore controls the number of characters in the field but for integers INT(11) the 11 refers to a display width and has no impact on the amount of data stored
References
Labels |
Added:
?
|
The same applies to tinyint
.
See related PR #28501 .
To get rid of the deprecation notices we can change our SQL scripts to not use display width values anymore for int
and tinyint
columns. But this has to include also all present update SQL scripts, not only the scripts for new installation.
The question is if we want to do this for staging and 3.10-dev and 4.0-dev, or only for 4.0-dev.
The deprecation notices became more urgent since the default value for the server configuration option to show these notices was not to show them by default, but this may have change with a recent 8.0.x version of MySQL.
We have to keep in mind that MariaDB behaves differently and still supports display widths, as far as I know.
But Brian is absolutely right, these values never had any impact on accuracy, value range or storage size of such database columns, so they should never have been used at the beginning, and we safely can remove them after my PR #28501 has made the database checker clever enough to just ignore these display widths.
Am working on it.
First PR is ready. It doesn't fix the SQL scripts, so it doesn't fix the issue here , but it is a requirement for fixing the SQL scripts in order not to get database problems reported by the database schema checker. See PR #32605 .
Update: That PR is not required to fix the issue here as long as we have no update SQL script modifying columns with any of the types "smallint", "mediumint" or "bigint". But it is helpful to be safe for such changes when this issue here has been fixed.
@brianteeman The first PR for staging is ready: #32606 . I'd be happy if you could test. Thanks in advance.
@brianteeman The PR for 4.0-dev is ready now, too: #32608 . I'd be happy if you could test that one, too. Thanks in advance.
@brianteeman The PR for 3.10-dev is ready now, too: #32607 . I'd be happy if you could test that one, too. Thanks in advance.
In opposite to the other two PR's mentioned before, this one can be easily tested by code review. But I'd prefer it do be done by someone who has tested one of the other two PR's before, so he or she is aware of the issue and how it is fixed.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-20 20:37:11 |
Closed_By | ⇒ | richard67 |
Closing as having the three pull requests mentioned in my previous three comments. Please test. Thanks in advance.
I can confirm all the above.