RTC bug PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
18 Apr 2024

Pull Request for Issue #43302 .

Summary of Changes

This pull request (PR) fixes the syntax error in the SQL code comment in the update SQL scripts "5.1.0-2024-02-24.sql" mentioned in the referred issue.

Note that the SQL syntax error will never happen when updating Joomla to 5.1.x as the updater splits the SQL script into the single statements, stripping off any comments (also those with the syntax error), and runs these statements one by one. The error happens only if you copy the content of the script into an SQL client to run the statements "manually", e.g. when trying to fix an update which failed for other reasons.

Testing Instructions

Code review.

Or if you want to do a real test: Depending on which database type you have available for testing (MySQL/MariaDB or Postgresql), copy the content of the update SQL script "5.1.0-2024-02-24.sql" into an SQL client, e.g. phpMyAdmin for MySQL/MariaDB or phpPgAdmin for PostgreSQL, replace the #__ by your real table name prefix and run the SQL statement.

  • With MySQL/MariaDB use script "administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-02-24.sql".
  • With PostgreSQL use script "administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-02-24.sql".

Actual result BEFORE applying this Pull Request

See issue #43302 .

Expected result AFTER applying this Pull Request

No SQL syntax error with that comment.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 18 Apr 2024
avatar richard67 richard67 - change - 18 Apr 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Apr 2024
Category SQL Administration com_admin Postgresql
avatar richard67 richard67 - change - 18 Apr 2024
The description was changed
avatar richard67 richard67 - edited - 18 Apr 2024
avatar exlemor
exlemor - comment - 21 Apr 2024

Hi @richard67,

I must be doing something wrong because whether the patch is Applied or Not:

If I use the Import feature in phpmyadmin, the 5.1.0-2024-02-24.sql is successfully upload/merged/imported without errors.

If I use the SQL queries window, I get an error as long as the comment blocks are there whether the patch is Applied or Not,
if I remove the comment blocks, the code works fine (which obviously defeats the purpose of this test).

MySQL 8.0.36.

(sorry) :(

avatar richard67
richard67 - comment - 21 Apr 2024

@exlemor You are right, there is one more syntax error in another comment line. Will fix in a few minutes.

Update: No, the PR is ok.

avatar richard67 richard67 - change - 21 Apr 2024
The description was changed
avatar richard67 richard67 - edited - 21 Apr 2024
avatar richard67
richard67 - comment - 21 Apr 2024

@exlemor As my instructions say you should use the SQL input window, not the import. What I've forgotten to mention is that it needs to replace the #__ by the real database prefix. I've added that to my testing instructions.

It does not really need to apply the PR for testing. It is enough to copy the original SQL from the unmodified file in the 5.1-dev branch and from the modified SQL file from this PR here by going to the files on GitHub.

avatar richard67
richard67 - comment - 21 Apr 2024

@exlemor P.S. I've just tested here and it works as I described. I.e. with the original SQL from 5.1-dev I get the syntax error mentioned in the issue because of the two ----------------------------------------------------------- comment lines, and with the file from this PR these two comment lines become -- -------------------------------------------------------- (mind the space after the first 2 -), and there is no syntax error anymore.

The unmodified files can be found here:

The files from this PR are here:

avatar dautrich dautrich - test_item - 22 Apr 2024 - Tested successfully
avatar dautrich
dautrich - comment - 22 Apr 2024

I have tested this item ✅ successfully on 2b1c2af

Tested with:

avatar alikon alikon - test_item - 22 Apr 2024 - Tested successfully
avatar alikon
alikon - comment - 22 Apr 2024

I have tested this item ✅ successfully on 2b1c2af


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

avatar alikon alikon - change - 22 Apr 2024
Status Pending Ready to Commit
avatar alikon
alikon - comment - 22 Apr 2024

RTC


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

avatar wilsonge wilsonge - change - 23 Apr 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-04-23 12:29:33
Closed_By wilsonge
Labels Added: RTC bug PR-5.1-dev
avatar wilsonge wilsonge - close - 23 Apr 2024
avatar wilsonge wilsonge - merge - 23 Apr 2024

Add a Comment

Login with GitHub to post a comment