User tests: Successful: Unsuccessful:
Pull Request for Issue #28367 .
This Pull Request (PR) changes the database schema checker for MySQL so that any display width is ignored for integer (int
or tinyint
) columns when checking these columns.
The reason for this is that beginning with MySQL 8.0.19, the type
in a SHOW COLUMNS
statement doesn't include anymore the display width if the database has been created in that version, while on previous versions it is included. E.g. on MySQL 5.7 or 8.0.18 the type
value is "int(11)" or "int(10) unsigned" or "tinyint(3)" while on mySQL 8.0.19 it is just "int" or "int unsigned" or "tinyint".
The display width doesn't have any impact on value range or storage size for an integer column, it only determines how a value would be left-padded with zeros if that would be done, but this padding is deprecated anyway. See https://dev.mysql.com/doc/refman/8.0/en/numeric-type-attributes.html for details.
Have a MySQL database with version 8.0.19 and another one with an older version, e.g. 5.7 or 8.0.18 or a MariaDB. If you don't have both but only one of these 2, report back with which version you have tested. At the end it needs each 2 tests for the following cases:
Install a clean staging without the patch of this PR applied on MySQL 8.0.19, using a database which you have created on that database version or creating a new one during installation.
Then go to the database checker.
Result: You see errors about columns of type int(11)
and int(10)
and tinyint(3)
and similar. See section "Actual result" below.
Now apply the patch of this PR and go again to the database checker or reload the page if still there.
Result: No errors are shown, see section "Expected result" below.
Now delete configuration.php and install the staging with the patch of this PR applied on a MySQL version prior to 8.0.19, e.g. 5.7 or 8.0.18.
Then go to the database checker.
Result: With this PR applied it works as before for MySQL prior to 8.0.19, i.e. there are no database errors after a clean install.
All database table structures are up to date.
No problems were found.
Using the "Fix" button does not fix these false errors.
None.
I found following statement here https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-19.html in section "Deprecation and Removal Notes":
For DESCRIBE statements and INFORMATION_SCHEMA queries, output is unaffected for objects created in previous MySQL 8.0 versions because information already stored in the data dictionary remains unchanged. This exception does not apply for upgrades from MySQL 5.7 to 8.0, for which all data dictionary information is re-created such that data type definitions do not include display width.
I.e. if you have updated e.g. an 8.0.18 to an 8.0.19, previously present databases still will show the display width in their integer data types, and so you can't reproduce the issue. But as soon as using a newly created database, you can reproduce it.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
tested only on mysql 8.0.19-0ubuntu0.19.10.3
I've just adjusted the testing instructions so it doesn't need testers having both kinds of databases MySQL 8.0.19 to check that the PR solves the issue, and MySQL older than 8.0.19 or MariaDB to check that for these the PR doesn't create a new issue.
Testers please report back with which version you have tested.
At the end it will need 2 tests of each kind of the following 2 kinds:
I have tested this item
MySQL 8.0.18 & 8.0.19
MariaDB 10.4.10
Windows 10 WampServer
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-04 08:55:46 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
Thanks
While working on issue #32542 I've noticed that this PR here should have handled also the other integer data types and not only int
and tinyint
. The reason why I haven't done that is that for the other types we do not have any relevant update SQL scripts to be checked by the schema checker, and so we never ran into the issue fixed by this PR. Am preparing a PR now.
@alikon @brianteeman Could you test this one, too? Is same as #28370 for J4, but here for staging, and in opposite to the other one I had to handle tinyint columns here, soo, see the screenshot in the description.