[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] Use filename hash as secdb primary key to avoid long path collisions

"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a1240ce686d1_3819280021924@gitlab-sidekiq-low-urgency-cpu-bound-v2-d7f87744c-m9tcd.mail>

ushindi bienvenu pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki


Commits:
07431343 by ushindi bienvenu at 2026-05-24T02:05:11+02:00
[FIX] Use filename hash as secdb primary key to avoid long path collisions

- - - - -


2 changed files:

- db/tiki-secdb_27.6_mysql.sql
- installer/schema/20260524_increase_filename_len_in_pk_tiki.sql


Changes:

=====================================
db/tiki-secdb_27.6_mysql.sql
=====================================
The diff for this file was not included because it is too large.

=====================================
installer/schema/20260524_increase_filename_len_in_pk_tiki.sql
=====================================
@@ -1,3 +1,10 @@
 ALTER TABLE `tiki_secdb`
-DROP PRIMARY KEY,
-ADD PRIMARY KEY (`filename`(186), `tiki_version`(5));
\ No newline at end of file
+  ADD COLUMN `filename_hash` CHAR(32) NOT NULL DEFAULT '' AFTER `filename`;
+
+UPDATE `tiki_secdb`
+SET `filename_hash` = MD5(`filename`)
+WHERE `filename_hash` = '';
+
+ALTER TABLE `tiki_secdb`
+  DROP PRIMARY KEY,
+  ADD PRIMARY KEY (`filename_hash`, `tiki_version`(20));



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/074313435d1d1b38e818c38f9a482abd8dfe325d

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/074313435d1d1b38e818c38f9a482abd8dfe325d
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.