? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
8 Sep 2019

Pull Request (PR) for new issue.

Summary of Changes

Fix no. 1:

This PR changes the index name of the combined index over columns (term,language) of table #__finder_terms from idx_term to idx_term_language for new installations on MySQL databases, i.e. in file mysql/joomla.sql, so it is consistent with how we name combined indexes over columns in general, and also consistent how it is done for PostgreSQL.

This also fixes the problem that an index with name idx_term is dropped and then added back with the same name in the update sql script mysql/4.0.0-2018-07-29.sql. The database schema checker does not support drop and and back an index with the same name, and it would end in a ping pong of index exists but should not and index does not exist but it should error from fix to next fix button run.

Fix no. 2:

The problem that the ping pong mentioned with the previous fix doesn't happen right now is because of another mistake in the same update script: The ALTER TABLE statement which contains the index changes handled here combines several changes, separated by comma. This is valid SQL of course, but not supported by the database schema checker/fixer. If we are lucky it checks the first statement, if we are unlucky it can result in an SQL syntax error, or the statements is not checked, depending if some spaces before and after these commas or not. For the checker/fixer there has to be one single ALTER TABLE statement for each change. This is also fixed by this PR here for MySQL. For PostgreSQL this has to be fixed, too. This is done in PR #26219 .

Fix no. 3:

In the same update sql script is another mistake: It adds an index with name language over the language column, in addition to the index idx_language on the same column. In file mysql/joomla.sql there is only index idx_language, so the additional index with name language in the update sql could be some copy and pase remainder. This PR fixes also this.

General remark on changing the SQL update script

Since we are not in beta yet and so don't have to support updates from 4.0-Alpha-x to 4.0-Alpha-y or between nightly builds, we can change the existing 4.0 update scripts (but of course not pre-4.0 scripts). Later when in beta this will not be allowed anymore, so now is a good time to fix it.

Testing Instructions

Code review.

I will see if I can add some instructions for a real test, if I get feedback that code review is not enough.

Expected result

Index names of table #__finder_terms are consistent in files mysql/joomla.sql and mysql/4.0.0-2018-07-29.sql, and the new index over columns (term,language) is added with the right, new name in file mysql/4.0.0-2018-07-29.sql, like it is already done for PostgreSQL.

For each index change of table #__finder_terms, one separate ALTER TABLE statement is used.

Actual result

See summary of changes at the top.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Sep 2019
Category SQL Administration com_admin Installation
avatar richard67
richard67 - comment - 8 Sep 2019

@wilsonge @Hackwar Please review. I don't have the privilege to request reviews, it seems.

avatar richard67
richard67 - comment - 8 Sep 2019

Mysql system test failure in drone seems not to be related to this PR but to some file moving stuff.
Update: Solved meanwhile.

avatar richard67
richard67 - comment - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
Labels Added: ?
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67 richard67 - change - 8 Sep 2019
The description was changed
avatar richard67 richard67 - edited - 8 Sep 2019
avatar richard67
richard67 - comment - 8 Sep 2019

@Hackwar @alikon Feel free to review, too.

avatar alikon alikon - test_item - 9 Sep 2019 - Tested successfully
avatar alikon
alikon - comment - 9 Sep 2019

I have tested this item successfully on feb51cf


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

avatar Hackwar Hackwar - test_item - 9 Sep 2019 - Tested successfully
avatar Hackwar
Hackwar - comment - 9 Sep 2019

I have tested this item successfully on feb51cf


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Sep 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Sep 2019

Status "Ready To Commit".

avatar wilsonge wilsonge - change - 9 Sep 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-09-09 10:52:11
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 9 Sep 2019
avatar wilsonge wilsonge - merge - 9 Sep 2019
avatar wilsonge
wilsonge - comment - 9 Sep 2019

Thanks!

avatar richard67
richard67 - comment - 9 Sep 2019

Thanks, too.

Add a Comment

Login with GitHub to post a comment