[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [FIX] Add filename_hash to avoid secdb long path PK collisions

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

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


Commits:
f37adfc3 by ushindi bienvenu at 2026-05-24T02:31:41+02:00
[FIX] Add filename_hash to avoid secdb long path PK collisions

- - - - -


2 changed files:

- db/tiki-secdb_27.6_mysql.sql
- doc/devtools/release.php


Changes:

=====================================
db/tiki-secdb_27.6_mysql.sql
=====================================
@@ -1,5 +1,6 @@
 start transaction;
 DELETE FROM `tiki_secdb`;
+ALTER TABLE `tiki_secdb` ADD COLUMN `filename_hash` CHAR(32) NOT NULL AFTER `filename`;
 ALTER TABLE `tiki_secdb` DROP PRIMARY KEY, ADD PRIMARY KEY (`filename_hash`, `tiki_version`(20));
 
 INSERT INTO `tiki_secdb` (`filename`, `filename_hash`, `md5_value`, `tiki_version`) VALUES 


=====================================
doc/devtools/release.php
=====================================
@@ -304,6 +304,7 @@ function updateSecdb($version)
         // This index was originally created with a size limit that would raise an error on some versions,
         // notably on 18.0. Since this file is executed before any patch in installer/schema, the fix had to
         // be done here. It's a quick operation because table is empty, so no harm in leaving this here forever.
+        fwrite($fp, "ALTER TABLE `tiki_secdb` ADD COLUMN `filename_hash` CHAR(32) NOT NULL AFTER `filename`;\n");
         fwrite($fp, "ALTER TABLE `tiki_secdb` DROP PRIMARY KEY, ADD PRIMARY KEY (`filename_hash`, `tiki_version`(20));\n\n");
 
         $insertString = 'INSERT INTO `tiki_secdb` (`filename`, `filename_hash`, `md5_value`, `tiki_version`) VALUES ';



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f37adfc33a34fe5d06d6e55a241dc1d73522425b
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.