Closed joeiacoponi1 closed 3 months ago
One of my modified queries had a performance issue, so I dug in and found these 2 missing akismet indexes when going through the double upgrade code above:
--
-- Indexes for dumped tables
--
--
-- Indexes for table `mlf2_akismet_rating`
--
ALTER TABLE `mlf2_akismet_rating`
ADD PRIMARY KEY (`eid`),
**ADD KEY `akismet_spam` (`spam`),
ADD KEY `spam_check_status` (`spam_check_status`);**
I found the issue with the missing indexes for the akismet-spam-table myself and solved it meanwhile in the pull request with the fixes for the upgrade script (#707). It's currently (2024-04-11) not merged into the main branch.
When upgrading from 2.4.24 with the interim version 20220803.1, the resultung structure misses the index for the column mlf2_userdata.user_type
. This index is present, if one upgrades directly from 2.4.24. Have to check if the index is superfluous or really missing.
[edit]: The definition in the installation script is as follows.
CREATE TABLE mlf2_userdata (
...
user_type tinyint(4) NOT NULL default '0',
...
KEY key_user_type (user_type),
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
When upgrading from 2.4.24 with the interim version 20220803.1, the resultung structure is different regarding the column mlf2_userdata.user_email
. After a direct upgrade from 2.4.24 its definition is user_email varchar(255) DEFAULT NULL
, after an upgrade over the interim step of version 20220803.1 its definition is user_email varchar(255) NOT NULL
. The latter is correct.
When upgrading from 2.4.24 with the interim version 20220803.1, the resultung structure misses the index for the column
mlf2_userdata.user_type
. This index is present, if one upgrades directly from 2.4.24.
Correct is: MLF 2.4.24 contains the index user_type
for the column mlf2_userdata.user_type
. With version 20220508.1 this was changed to the index key_user_type
. The current upgrade script does not reflect this change. At the same time the script does delete indexes whose name starts with 'user_' from the table mlf2_userdata
in cases of an upgrade, starting with version 2.4.99.2 or any later version. That causes the index for the column mlf2_userdata.user_type
to be gone.
This is fixed now with the commits 3daf49457df and a355fb27b69 in #707.
After a direct upgrade from 2.4.24 the definition of
mlf2-userdata.user_email
definition isuser_email varchar(255) DEFAULT NULL
, after an upgrade over the interim step of version 20220803.1 its definition isuser_email varchar(255) NOT NULL
. The latter is correct.
This got corrected with 0f0692374a5 in #707.
I'll close this issue now. Thank you for your contribution. This is very appreciated and helpful.
This is a phpMyAdmin structure export of MLF after upgrade from 2.4.24 --> 20220803.1 --> 20240308.1.