User tests: Successful: Unsuccessful:
Pull Request for Issue #42413.
On MySQL Galera replication clusters MEMORY tables are not supported, but MySQL returns an error only at the first write. If the table is empty the first write never happens and no error is returned at the ALTER TABLE instruction, but it will fail at the first write (i.e. editing an article). Proceed with the conversion to MEMORY only if the tables are not empty.
See linked issue. I have tested this on my Production environment.
Joomla returns the following error while editing an article:
Save failed with the following error: The table does not comply with the requirements by an external plugin.
Save operation should complete successfully.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_finder |
| Labels |
Added:
PR-5.0-dev
|
||
P.S
thanks for your 1st pr ?
from a pure SQL concept looks good. Could be condensed I think to a single query:
$db->setQuery('SELECT EXISTS (SELECT 1 FROM ' . $db->quoteName('#__finder_tokens' UNION ALL SELECT 1 FROM ' . $db->quoteName('#__finder_tokens_aggregate') . ')');
Alternately:
I"m not 100% sure of the Joomla structures however if doing individual tests before alter:
foreach (array($db->quoteName('#__finder_tokens), $db->quoteName('#__finder_tokens_aggregate')) as $tbl) {
$db->setQuery('SELECT EXISTS (SELECT 1 FROM ' . $tbl . ')');
if ($db->loadResult() === 0) {
continue;
}
$db->setQuery('ALTER TABLE ' . $tbl . ' ENGINE = MEMORY');
$db->execute();
}
| Title |
|
||||||
This pull request has been automatically rebased to 5.2-dev.
| Title |
|
||||||
Unfortunately this is an issue which is VERY hard to test. Very few people have a MySQL cluster to test all of this and without 2 tests we wont move forward here. So I'd like to make a proposal: Could you maybe create a new PR with a new switch in the Smart Search configuration in the backend. That switch would enable the dynamic management of those tables and if switched off, it would basically disable Indexer::toggleTables(), allowing you to set the table to InnoDB once and them not being changed all the time or requiring core hacks to disable that method. Would that be acceptable?
In that case it would have to go into 5.3.
This pull request has been automatically rebased to 5.3-dev.
| Title |
|
||||||
This pull request has been automatically rebased to 5.4-dev.
| Title |
|
||||||
| Labels |
Added:
bug
PR-5.4-dev
Removed: PR-5.0-dev |
||
Hello there,
I have tested this code (just copied and pasted) in a joomla 6.1 with a MySQL Cluster 8.4.
Before this code I had errors indexing in the smart search component.
After using this code that worked.
If you test in a cluster /group replica its important to have ql_generate_invisible_primary_key activated so you can drop _finder_tokens and finder_tokens_aggregate tables to recreate with insivble pk for group replicas.
Without this code the tables engine is changed to memory even if you create it with innodb before.
Thanks
Hello there,
I have tested this code (just copied and pasted) in a joomla 6.1 with a MySQL Cluster 8.4. Before this code I had errors indexing in the smart search component.
After using this code that worked.
If you test in a cluster /group replica its important to have ql_generate_invisible_primary_key activated so you can drop _finder_tokens and finder_tokens_aggregate tables to recreate with insivble pk for group replicas.
Without this code the tables engine is changed to memory even if you create it with innodb before.
Thanks
@lscorcia If that means that you have successfully tested this PR, then please go to the PR in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/42414 and use the blue "Test this" button, select your test result and submit. In this way your test will be properly counted. Each PR needs 2 successful human tests. Thanks in advance.
I have tested this item ✅ successfully on 0df1e8a
Tested in Joomla 5.4.
I have tested this item ✅ successfully on 0df1e8a
Tested in Joomla 6.1 with MySQL Cluster 8.4
I have tested this item ✅ successfully on 0df1e8aTested in Joomla 5.4.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42414.
@lscorcia Sorry, my mistake. I wanted to ping @PepDevel .
I will remove your test as the author of a pull request is required to have tested his own PR anyway, so only tests from other people than the author count.
So we have one test from @PepDevel .
i'm a newbie with MySQL Galera ..and even i cannot remember the MariaDB equivalent name
but sounds safe, on code review