No Code Attached Yet
avatar schultz-it-solutions
schultz-it-solutions
15 Oct 2024

Not sure this qualifies as a "bug report". I stumbled accross this deprecation warning in another setting (not Joomla! related).
However I belief it is worth checking if Joomla! needs to act on this one.

Additional comments

On installing an (non Joomla!) application on a PHP / MySQL instance, I received the above mentioned deprecation warning:

Warning: #1681 Integer display width is deprecated and will be removed in a future release.

The (suggested) solution is to get rid of all the INT(x) declarations in the database and replace them with just INT declarations.
The "display width do not affect the storage size of the data type" according to my research
https://stackoverflow.com/questions/58938358/mysql-warning-1681-integer-display-width-is-deprecated

So it might be useful to deal with this issue, before users get confused by these deprecation warnings

cheers
Ruediger Schultz

avatar schultz-it-solutions schultz-it-solutions - open - 15 Oct 2024
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Oct 2024
avatar alikon
alikon - comment - 15 Oct 2024

thanks for reporting, for what i'm aware of joomla are not impacted by this
maybe @richard67 can confirm

avatar richard67
richard67 - comment - 15 Oct 2024

That has been fixed for the Joomla core long time ago, but I haven't checked recently if someone has reintroduced that deprecated display widths for integers.

avatar schultz-it-solutions
schultz-it-solutions - comment - 15 Oct 2024

The latest websites I setup (from scratch) with Joomla 4 and 5 still have those "int(10)" declarations.

avatar richard67
richard67 - comment - 15 Oct 2024

The latest websites I setup (from scratch) with Joomla 4 and 5 still have those "int(10)" declarations.

I've just checked all SQL files for 5.2-dev and they do not use any "int(" or similar.

What might have happened in your case is following.

For MySQL 8 the display widths for integer types were deprecated, but MariaDB still uses them and used default values when they are not given like it is in our SQL files. So if you e.g. export a database from MariaDB and import it into MySQL 8, you will get a lot of deprecated warnings.

@schultz-it-solutions Are you using MariaDB?

avatar richard67
richard67 - comment - 15 Oct 2024

The display widths for integer types have been removed in the Joomla core already with version 3.9.6 and 4.0, see following PRs: #32605 , #32606 , #32607 and #32608 .

avatar schultz-it-solutions
schultz-it-solutions - comment - 15 Oct 2024

Sorry for this confusion.
@richard67
I just checked the 4.2 branch and you are right, there are no INT(x) declarations - so they have been removed long time ago as you said.

your answer is spot on. That is most probably exactly what happend:
My development environment is on MariaDB (where those INT(x) values were probably included by MariaDB while setting up the database.
The production system for that application is on MySQL, which threw those deprecation warnings, when we "inital loaded" the database from the MariaDB test environment.

Please consider this issue closed!

cheers
Ruediger

avatar richard67 richard67 - change - 15 Oct 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-10-15 11:18:34
Closed_By richard67
avatar richard67 richard67 - close - 15 Oct 2024
avatar richard67
richard67 - comment - 15 Oct 2024

Closing as not a core issue. See previous comments for explanation. @schultz-it-solutions Anyway thanks for reporting. Better safe than sorry.

Add a Comment

Login with GitHub to post a comment