[TikiWiki-commits] [Git][tikiwiki/tiki][tiki-fix-database-update-tiki-comments] [FIX] tiki_comments: remove idx_comments_message_lookup index
"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69943a0edadcf_3b1867bc79f7@gitlab-sidekiq-low-urgency-cpu-bound-v2-68d4c9bc4c-lxzg2.mail> |
Sammy Ndabo pushed to branch tiki-fix-database-update-tiki-comments at Tiki Wiki CMS Groupware / Tiki
Commits:
a8258cea by Sammy Ndabo at 2026-02-17T11:50:48+02:00
[FIX] tiki_comments: remove idx_comments_message_lookup index
- - - - -
3 changed files:
- db/tiki.sql
- installer/schema/20251104_update_messageid_from_tiki_comments_tiki.sql
- installer/schema/20251128_reduce_tiki_comments_index_prefix_lenght_tiki.sql
Changes:
=====================================
db/tiki.sql
=====================================
@@ -724,7 +724,6 @@ CREATE TABLE `tiki_comments` (
`approved` char(1) NOT NULL default 'y',
`locked` char(1) NOT NULL default 'n',
PRIMARY KEY (`threadId`),
- KEY `idx_comments_message_lookup` (`parentId`, `userName`(20), `title`(30), `commentDate`, `message_id`(30), `in_reply_to`(30)),
KEY `title` (`title`(191)),
KEY `data` (`data`(191)),
KEY `hits` (hits),
=====================================
installer/schema/20251104_update_messageid_from_tiki_comments_tiki.sql
=====================================
@@ -3,5 +3,4 @@ ALTER TABLE `tiki_comments`
DROP INDEX `no_repeats`,
MODIFY `message_id` TEXT default NULL,
MODIFY `in_reply_to` varchar(255) default NULL,
- ADD KEY `idx_comments_message_lookup` (`parentId`,`userName`(40),`title`(43),`commentDate`,`message_id`(40),`in_reply_to`(40)),
ADD KEY `threaded` (`message_id`(89),`in_reply_to`(88),`parentId`);
=====================================
installer/schema/20251128_reduce_tiki_comments_index_prefix_lenght_tiki.sql
=====================================
@@ -1,19 +1,2 @@
ALTER TABLE `tiki_comments` DROP INDEX `threaded`;
ALTER TABLE `tiki_comments` ADD KEY `threaded` (`message_id`(40),`in_reply_to`(40),`parentId`);
-SET @comments_lookup_index := (
- SELECT INDEX_NAME
- FROM information_schema.STATISTICS
- WHERE TABLE_SCHEMA = DATABASE()
- AND TABLE_NAME = 'tiki_comments'
- AND INDEX_NAME IN ('idx_comments_message_lookup', 'no_repeats')
- LIMIT 1
-);
-SET @drop_comments_lookup_index_sql := IF(
- @comments_lookup_index IS NULL,
- 'SELECT 1',
- CONCAT('ALTER TABLE `tiki_comments` DROP INDEX `', @comments_lookup_index, '`')
-);
-PREPARE drop_comments_lookup_index_stmt FROM @drop_comments_lookup_index_sql;
-EXECUTE drop_comments_lookup_index_stmt;
-DEALLOCATE PREPARE drop_comments_lookup_index_stmt;
-ALTER TABLE tiki_comments ADD KEY idx_comments_message_lookup ( parentId, userName(20), title(30), commentDate, message_id(30), in_reply_to(30));
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a8258cea4cce71fd0f3cb96a4108b5ddbada30f0
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/a8258cea4cce71fd0f3cb96a4108b5ddbada30f0
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs