? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
6 Jun 2016

Follow up #10710 .

Summary of Changes

added an index on field alias for content table to speed up alias duplicate check

Testing Instructions

see #10710

avatar alikon alikon - open - 6 Jun 2016
avatar alikon alikon - change - 6 Jun 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jun 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 6 Jun 2016

Doesn't this need to be in the update SQL as well?
On 6 Jun 2016 10:57 a.m., "Nicola Galgano" notifications@github.com wrote:

Follow up #10710 #10710 .
Summary of Changes

added an index on field alias for content table to speed up alias
duplicate check
Testing Instructions

see #10710 #10710

You can view, comment on, or merge this pull request online at:

#10739
Commit Summary

  • [com_content] - use index for check duplicate alias

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#10739, or mute the thread
https://github.com/notifications/unsubscribe/ABPH8b_wQ5BgBvYLwfpQV95UTIUJF8p4ks5qI-7rgaJpZM4IuvI5
.

avatar alikon
alikon - comment - 6 Jun 2016

yes there are

avatar brianteeman
brianteeman - comment - 6 Jun 2016

I must stop reading pr on my phone

avatar brianteeman brianteeman - change - 6 Jun 2016
Category Components MS SQL Postgresql SQL
avatar richard67
richard67 - comment - 6 Jun 2016

This will not work with utf8mb4. The index has to be limited to the first 100 characters of the alias column for mysql in the update script and in joomla.sql as we did for the other indexes, too, where the column is so long that it would exceed the maximum index size (in bytes).


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

avatar alikon
alikon - comment - 8 Jun 2016

@richard67 what about innodb-large-prefix=true ?

avatar richard67
richard67 - comment - 8 Jun 2016

@alikon I have no experience with that. From reading PHP manuals I am not sure if this option can be always set (there might be restrictions on that), but if it can, it would make it possible to use the full columns for the indexes and so of course be the best solutuion.

But in this case we should also change other indexes where we currently use the 1st 100 chars only back to using the full columns, e.g. the many "idx_alias" indexes we have, so everything is consistent.

I am not really a mysql expert, so maybe you should discuss that with someone else, or maybe ask PLT to decide, e.g. @wilsonge (he could ask Eli, I do not find Eli here with the "@" method).

I could help to identify what all has to be changed if there was a decision to go that way. Otherwise, if PLT is against it or it will not always work with the innodb-large-prefix option, you can apply to your PR here the same change which you once got from me with your other PR before, with limiting the column in the index to the 1st 100 chars.

You know I was helping with the utf8mb4 conversion stuff as far as I could, but I was also new to all that stuff, and so meanwhile after having learned a bit more I see we could have done many things better, and some stuff (e.g. enlarging varchar columns from 250 or 255 to 400) was not really necessary.

And that keeps me a bit from continuing work on it, e.g. on utf8mb4 conversion for extensions, because there would be much to clean up, and I do not want to repeat for the extensions the mistakes we (me but not only me) made with utf8mb4 conversion for the core.

avatar brianteeman
brianteeman - comment - 3 Aug 2016

@aschkenasy your input would be appreciated on this


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 8 Jan 2017

I have tested this item ? unsuccessfully on 06c3f43

Followed Test instructions in #10710 but could only find SELECT * FROM __content WHEREid= '1'. Is this Patch to test or do i miss something?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/10739.
avatar franz-wohlkoenig franz-wohlkoenig - test_item - 8 Jan 2017 - Tested unsuccessfully
avatar mbabker
mbabker - comment - 21 May 2017

@alikon Any updates here?

avatar alikon
alikon - comment - 22 May 2017

well the simplest thing we could do is to go with:
ALTER TABLE '#__content' ADD INDEX 'idx_alias' ('alias'(191));
for mysql only as it is the only one affected by utf8mb4 key limit

cause go for

  • innodb_large_prefix = 1
  • innodb_file_format = Barracuda
  • ROW_FORMAT=DYNAMIC

should be a little bit more complex

but i'd want to listen @aschkenasy

avatar richard67
richard67 - comment - 25 May 2017

@alikon I agree with your previous statement. We should not forget to add this to the utf8mb4 conversion scripts, as it is with other indexes. If necessary I can help with this.

@franz-wohlkoenig Where are the "details following" you promised with your test result?


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 May 2017

@richard67 i wrote "Followed Test instructions …" … or you mean something different?

avatar richard67
richard67 - comment - 25 May 2017

@franz-wohlkoenig It seems the issue tracker is not up to date with the text on GitHub, see screenshot from issue tracker:
screen shot 2017-05-25 at 14 33 57
Sorry for confusing you.


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 25 May 2017

@richard67 got it. To be honest: I can't remember.

avatar joomla-cms-bot joomla-cms-bot - change - 3 Jun 2017
Category Components MS SQL Postgresql SQL SQL Administration com_admin Postgresql MS SQL Installation Components
avatar richard67
richard67 - comment - 3 Jun 2017

@alikon You should rename your schema update sql scripts to 3.7.3-2017-06-03.sql or later date. Otherwise they will not be executed on a Joomla version between 3.6.1 and 3.7.2 when updating to 3.7.3 which will include this PR if all good.

avatar alikon
alikon - comment - 3 Jun 2017

can you help me with the coversion script?

avatar richard67
richard67 - comment - 3 Jun 2017

@alikon You mean me? Conversion scripts look ok, but installation/sql/sqlazure/joomla.sql has big conflicts.

avatar alikon
alikon - comment - 3 Jun 2017

i'm trying to solve the conflict .... so no need to do things on the conversion script side @richard67 ?

avatar richard67
richard67 - comment - 3 Jun 2017

@alikon Ah you mean those for utf8mb4 comversion .. those have to be updated, too.

avatar richard67
richard67 - comment - 3 Jun 2017

@alikon Done, see PRs 28 and 29 against your repository.

avatar richard67
richard67 - comment - 3 Jun 2017

@alikon Theoretically, the changes in the utf8mb4 conversions scripts are not necessary, because your index was right from the beginning on and so has not been modified. But I remember that when I had made the utf8mb4 stuff, we had errors with mysql complaining about lengths of indexes during converting the charset of the table even when the index length limit was already ok, so it is not a bad idea to add that to be on the safer side.

avatar alikon
alikon - comment - 3 Jun 2017

thank you @richard67

avatar richard67
richard67 - comment - 3 Jun 2017

@alikon Sorry, my mistake. Could you just change "ADD INDEX" to "ADD KEY" in the 2nd conversion script? Just to be consistent, it would work also with "ADD INDEX" but does not look nice if all the others are "ADD KEY".

avatar alikon
alikon - comment - 3 Jun 2017

@aschkenasy could be a good idea for joomla 4.0

avatar richard67
richard67 - comment - 7 Jun 2017

@alikon Unfortunately, if my PR #16469 will be merged (it has already RTC), you might have merge conflicts again because I also used 3.7.3-2017-06-03.sql as name of some new schema updates. You can avoid this by renaming your schema updates to a different name, e.g. 3.7.3-2017-06-07.sql before my PR is merged.
I recommend to use separate files for my and your PR also because we should not put too many things which are not related to each other in 1 schema update file.

avatar alikon
alikon - comment - 8 Jun 2017

changed file date name as requested for avoid conflict with #16469

avatar richard67
richard67 - comment - 10 Jun 2017

I have tested this item successfully on 0f9d5fd

I tested as described here: #10567 (comment), including the modification of the file "/libraries/legacy/controller/form.php" desrcibed there.

First I created an article without this PR here being applied, then I applied this PR using the patchtester and went to "Extensions -> Manage -> Database" and used the "Fix" button to apply the schema update from this PR, means creating the index, then I again created an article in the same category as before, all having the "debug system" switched on in global config.

Without this PR applied, the query took longer than after, and after it used combined index on catid and alias while before it uses only catid.

See the screenshots I will provide with a comment soon.


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

avatar richard67 richard67 - test_item - 10 Jun 2017 - Tested successfully
avatar richard67
richard67 - comment - 10 Jun 2017

Before applying this PR:
screen shot 2017-06-10 at 11 37 00

After applying this PR:
screen shot 2017-06-10 at 11 37 06


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

avatar richard67
richard67 - comment - 10 Jun 2017

@franz-wohlkoenig Can you test this PR here again? See comment in my test result on how I tested. See screenshots of my result below my test result. This PR here is old but still good and very much worth to be merged.


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Jun 2017

@richard67

  1. file "/libraries/legacy/controller/form.php" modified,
  2. Debug enabled,
  3. no PR applied,
  4. new Article saved.

Got:
bildschirmfoto 2017-06-10 um 15 42 02
Which Query i have to look on?

avatar richard67
richard67 - comment - 10 Jun 2017

@franz-wohlkoenig as shown in my screenshot, the first one which selects from the content table where alias = x and catid = y. Should be the first statement at all selecting somthing from the #__content table.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Jun 2017

found nothing like in your Screenshot. Similar is:
bildschirmfoto 2017-06-10 um 16 25 32
but no catid.

avatar richard67
richard67 - comment - 10 Jun 2017

@franz-wohlkoenig You have to select a category for the article before using the save button. The category should not be "uncategorized".

avatar richard67
richard67 - comment - 10 Jun 2017

@franz-wohlkoenig And if no catid, what do you see when you click the "explain" link to expand the explain plan of that query? does it show if an index on the alias is used? before patch it should not show that, after patch it should show that.
Maybe you have only 1 category?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Jun 2017

A Category is select, its not "uncategorized", more than 20 Categories (sample data).

bildschirmfoto 2017-06-10 um 16 51 01

avatar richard67
richard67 - comment - 10 Jun 2017

Strange, I have no idea why your queries are so different to mine.

avatar richard67
richard67 - comment - 10 Jun 2017

@franz-wohlkoenig You create a new article, select an existing category, then use the "save", not the "save and close" button, then check all queries. Somewhere really should be a query like I have mentioned.

avatar richard67
richard67 - comment - 10 Jun 2017

@franz-wohlkoenig P.S. you can do that on the same page, no need to open a new tab as that comment in that other issue was telling.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Jun 2017

new Article in existing Category saved (not "save and close"), Queries checked in same Tab = same Result as above:
bildschirmfoto 2017-06-10 um 18 43 00

avatar alikon
alikon - comment - 13 Jun 2017

@franz-wohlkoenig to see the changed query with the debug plugin when saving an article in backend with user =admin you need to do a simple dirty hack
Edit file: https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/controller/form.php#L831

and add before return

if ( $context == 'com_content.edit.article' && JFactory::getUser()->username=='admin' && $app->isAdmin() )
{
    $this->setRedirect(null);
}
avatar richard67
richard67 - comment - 15 Jun 2017

@franz-wohlkoenig Maybe it depends on how you create the new article which queries are run? I did it in that way:
screen shot 2017-06-15 at 08 21 33
And then in the article edit view, I filled in a title, some text, chose an existing category which already contains some extensions, then clicked save button and then checked the query in the debug info. Of course I have applied the hack which @alikon mentioned above before I did that all. And I cleared all Joomla cache after applying the hack before the test without PR, and then again before applying the PR for the 2nd test.


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

avatar richard67
richard67 - comment - 15 Jun 2017

@ggppdk I ask you because you were involved in #10710 : Do you think you find time and mood to test this PR here? I am sure it will be an easy task for you.


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

avatar richard67
richard67 - comment - 15 Jun 2017

@franz-wohlkoenig P.S. In the hack of the PHP file your might have to replace "admin" by your superadmin's user name.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

Using Super Admins username give after Save only Debug-Console back, no Article (Aricle is saved, but locked). So Result is same, no cat-id is shown:
bildschirmfoto 2017-06-17 um 07 21 04

avatar richard67
richard67 - comment - 17 Jun 2017

@franz-wohlkoenig Are you sure you are testing on Joomla and not WP? ... Joking.
No, I have no idea what could be the difference causing the difference in our queries.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

hoping for a second Tester …

avatar richard67
richard67 - comment - 17 Jun 2017

I had the hope that @ggppdk could find time to help with a test because he was involved in #10710 .

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017

today was next Report on this Issue.

avatar richard67
richard67 - comment - 17 Jun 2017

@franz-wohlkoenig Where do you mean?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jun 2017
avatar richard67
richard67 - comment - 17 Jun 2017

@franz-wohlkoenig maybe you mixed up PRs? I think you wanted to write your comment to #16577 and not this one here.

avatar Sieger66 Sieger66 - test_item - 10 Sep 2017 - Tested successfully
avatar Sieger66
Sieger66 - comment - 10 Sep 2017

I have tested this item successfully on 0f9d5fd


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/10739.
avatar Sieger66
Sieger66 - comment - 10 Sep 2017

Before this PR:

screen shot 2017-09-10 at 09 57 07

After this PR:

screen shot 2017-09-10 at 09 57 41


Attention: For other testers this PR can not be full revert with the Revert-Patch-Button in the Patch-Tester because the Database is changed !

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

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Sep 2017
The description was changed
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 10 Sep 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Sep 2017

RTC after two successful tests.

avatar richard67
richard67 - comment - 10 Sep 2017

@franz-wohlkoenig and all maintaners and @alikon: Not commit this yet. It needs to change the names of the update files so they fit to actual version situation.
Change 3.7.3-2017-06-08.sql to e.g. 3.8.0-2017-09-10.sql if it will go into 3.8.0, and to something later if it will not go into 3.8.0.
After name change it will not need functional tests again from my point of view; a code review should be ok after that final change.

avatar richard67
richard67 - comment - 10 Sep 2017

@alikon Can you rename the update sql files?

avatar franz-wohlkoenig franz-wohlkoenig - change - 10 Sep 2017
Status Ready to Commit Pending
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 10 Sep 2017

Status back on "Pending" as stated above.


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

avatar richard67
richard67 - comment - 10 Sep 2017

@alikon To make it more comfortable for you to rename the SQL schema update files: See alikon#35.

avatar alikon
alikon - comment - 10 Sep 2017

thanks @richard67 merged

avatar richard67 richard67 - test_item - 10 Sep 2017 - Tested successfully
avatar richard67
richard67 - comment - 10 Sep 2017

I have tested this item successfully on 60751ad

Last commits only changed names of the schema update SQL scripts so they fit to the next Joomla version, so my previous test is still valid.


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

avatar richard67
richard67 - comment - 10 Sep 2017

@Sieger66 Can you mark your test result as successful again? No need to test again. Last commits only changed names of the schema update SQL scripts so they fit to the next Joomla version.


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

avatar Sieger66 Sieger66 - test_item - 11 Sep 2017 - Tested successfully
avatar Sieger66
Sieger66 - comment - 11 Sep 2017

I have tested this item successfully on 60751ad


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

avatar richard67
richard67 - comment - 11 Sep 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Sep 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 12 Sep 2017

RTC after two successful tests.

@richard67 Thanks for Hint.

avatar richard67
richard67 - comment - 19 Sep 2017

Now as Joomla 3.8.0 is released, it needs again to rename the schema update SQL scripts e.g. to 3.8.1-2017-09-19.sql.

@alikon Shall I again prepare a PR against your repo for your convenience?

@franz-wohlkoenig Should the RTC be removed until the schema update SQL scripts have been renamed? I don't know and leave it up to you.


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Sep 2017

@richard67 Maintainers should decide, so i let it as is.

avatar richard67
richard67 - comment - 19 Sep 2017
avatar richard67
richard67 - comment - 14 Oct 2017

@franz-wohlkoenig Any news on this?


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Oct 2017
avatar mbabker
mbabker - comment - 14 Oct 2017

I missed the RTC on this, sorry.

Just rename the SQL files for 3.8.2 (preferably with today's date too) and I'll merge it.

avatar richard67
richard67 - comment - 14 Oct 2017

@alikon See alikon#37 for rename of the schema update SQL scripts.

avatar alikon alikon - change - 14 Oct 2017
Labels Added: ?
avatar richard67
richard67 - comment - 14 Oct 2017

@mbabker Done. Merge please.

avatar alikon
alikon - comment - 14 Oct 2017

@richard67 thanks

avatar mbabker mbabker - change - 15 Oct 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-10-15 15:59:00
Closed_By mbabker
avatar mbabker mbabker - close - 15 Oct 2017
avatar mbabker mbabker - merge - 15 Oct 2017

Add a Comment

Login with GitHub to post a comment