User tests: Successful: Unsuccessful:
Pull Request for Issue #43302 .
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.
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.
See issue #43302 .
No SQL syntax error with that comment.
Please select:
No documentation changes for docs.joomla.org needed
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql |
@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.
@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:
I have tested this item ✅ successfully on 2b1c2af
Tested with:
I have tested this item ✅ successfully on 2b1c2af
Status | Pending | ⇒ | Ready to Commit |
RTC
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
|
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) :(