? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
7 Mar 2021

Pull Request for Issue #32542 (part).

Summary of Changes

This pull request (PR) removes display width modifiers for integer data types in DDL statements in all SQL scripts which are specific to 3.10 for MySQL and MariaDB databases.

It is only relevant for MySQL and MariaDB databases, i.e. not for PostgreSQL or MS SQL Server.

All SQL scripts not specific to 3.10 are handled in the staging branch with PR #32606 , so when that PR has been merged into staging and then up into 3.10-dev, this PR here will complete the change so all database column definitions with integer data types will be fixed in 3.10.

See PR #32606 for a detailed description of the reasons for this change.

Testing Instructions

Requirement

You need a MySQL or MariaDB database.

Testers please report back which of the following 2 kinds of databases you have used for the test:

  • MySQL database server with versions lower than 8.0.17 or any server version of MariaDB
  • MySQL database server with version 8.0.17 or later

If you have both scenarios available, please test both.

Test 1: Reproduce the issue

This test is optional and can be only executed when having a MySQL database server of version 8.0.17 or later.

If you don't have that kind of MySQL database server, skip this test.

During my tests I wasn't able to configure my MySQL 8.0.20 server in a way that the deprecation warnings for the display widths could be shown in the server log file, and you can believe me I've tried a lot of things.

Furthermore, it appeared that when importing an SQL script using display widths for integers in DDL into phpMyAdmin, there are also no warnings shown.

So if you want to see the issue you have to do as follows:

  1. In phpMyadmin, select a database.

  2. Copy the CREATE TABLE statements for the #__template_styles table from file installation/sql/mysql/joomla.sql of the 3.10-dev branch (i.e. not from this PR) into the SQL command window.

  3. Execute the SQL in the SQL command window (no need to replace the table name prefix before).

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

  1. Remove the table created in the previous step.

  2. Repeat steps 2 and 3 but using the same statement from the installation/sql/mysql/joomla.sql file of this PR.

Result: Don't get the warning from step 3.

Test 2: Code review

That a new installation works without any SQL error introduced by this PR is already tested by the system tests with drone.

So for testing this small PR, a code review is sufficient, but it should be done by someone who has tested PR #32606 or #32608 already, so he or she knows about what's the issue and how it is fixed.

On review, verify that the database column handled with this PR here is the only one with an integer data type which is added to the database when updating a latest 3.9.x nightly or current staging to current 3.10-dev or latest 3.10 nightly build.

Integer data types are:

  • tinyint
  • smallint
  • mediumint
  • int
  • bigint

Actual result BEFORE applying this Pull Request

When PR #32606 will be merged into staging and then staging will be merged into 3.10-dev, there will still be the place in the installation SQL (joomla.sql) file and the update SQL script handled by this PR where a display width modifier is used for a database column with an integer data type.

Expected result AFTER applying this Pull Request

When PR #32606 will be merged into staging and then staging will be merged into 3.10-dev, there will not be any place in 3.10-dev where display width modifiers for integer data types will be used in any SQL statements for MySQL (or MariaDB) databases.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 7 Mar 2021
avatar richard67 richard67 - change - 7 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Mar 2021
Category SQL Administration com_admin Installation
avatar richard67 richard67 - change - 7 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 7 Mar 2021
avatar richard67 richard67 - change - 13 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 13 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 20 Mar 2021
Title
[3.10] [WiP] Remove display widths for integer data types from SQL scripts for MySQL and MariaDB databases
[3.10] Remove display widths for integer data types from SQL scripts for MySQL and MariaDB databases
avatar richard67 richard67 - edited - 20 Mar 2021
avatar richard67 richard67 - change - 27 Mar 2021
Labels Added: ?
avatar richard67 richard67 - change - 27 Mar 2021
The description was changed
avatar richard67 richard67 - edited - 27 Mar 2021
avatar richard67
richard67 - comment - 27 Mar 2021

Just right now I've noticed I had forgotten to remove the "Work in progress" from the beginning of the testing instructions. The PR is ready for testing since 5 days ;-) I've fixed that now.

avatar chmst chmst - test_item - 27 Mar 2021 - Tested successfully
avatar chmst
chmst - comment - 27 Mar 2021

I have tested this item successfully on ef03240

By code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32607.

avatar alikon alikon - test_item - 28 Mar 2021 - Tested successfully
avatar alikon
alikon - comment - 28 Mar 2021

I have tested this item successfully on ef03240


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32607.

avatar alikon alikon - change - 28 Mar 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 28 Mar 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32607.

avatar zero-24 zero-24 - change - 30 Mar 2021
Labels Added: ?
avatar zero-24 zero-24 - change - 30 Mar 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-03-30 20:38:33
Closed_By zero-24
avatar zero-24 zero-24 - close - 30 Mar 2021
avatar zero-24 zero-24 - merge - 30 Mar 2021
avatar zero-24
zero-24 - comment - 30 Mar 2021

Merging thanks ?

avatar richard67
richard67 - comment - 30 Mar 2021

Thanks for tests and merge.

Add a Comment

Login with GitHub to post a comment