Loading...
 
Skip to main content

Tiki does not create tables uniformly with collation utf8_unicode_ci

Status
Open
Subject
Tiki does not create tables uniformly with collation utf8_unicode_ci
Version
18.x
Category
  • Bug
Feature
Installer (profiles, upgrades and server-related issues)
Resolution status
New
Submitted by
hman
Lastmod by
hman
Rating
(0)
Description

If have two Tikis running on 18.8 (before anyone asks: I cannot go to 21.x, because 21.x breaks my CSS layout...). As I discussed in the Forums before I started this bug report, one (the older) just recently stopped searching. Only when logged in as Admin I could see the reason behind that: A COLLATE clash...

Copy to clipboard
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' Die Abfrage war: SELECT DISTINCT c.`title` AS name, LEFT(c.`data`, 240) AS data, p.`hits` AS hits, c.`commentDate` AS lastModif, CONCAT(p.`pageName`,': ',c.`title`) AS pageName,outputType ,p.`pageName` AS id1,c.`threadId` AS id2, MATCH(c.`title`,c.`data`) AGAINST ('Kämpfer' IN BOOLEAN MODE) AS relevance FROM `tiki_comments` c, `tiki_pages` p left join `tiki_output` on `tiki_output`.`entityId` = p.`pageName` WHERE c.`objectType` = 'wiki page' AND p.`pageName`=c.`object` AND MATCH(c.`title`,c.`data`) AGAINST ('Kämpfer' IN BOOLEAN MODE) ORDER BY relevance desc, p.`hits` The built query was likely: SELECT DISTINCT c.`title` AS name, LEFT(c.`data`, 240) AS data, p.`hits` AS hits, c.`commentDate` AS lastModif, CONCAT(p.`pageName`,': ',c.`title`) AS pageName,outputType ,p.`pageName` AS id1,c.`threadId` AS id2, MATCH(c.`title`,c.`data`) AGAINST ('Kämpfer' IN BOOLEAN MODE) AS relevance FROM `tiki_comments` c, `tiki_pages` p left join `tiki_output` on `tiki_output`.`entityId` = p.`pageName` WHERE c.`objectType` = 'wiki page' AND p.`pageName`=c.`object` AND MATCH(c.`title`,c.`data`) AGAINST ('Kämpfer' IN BOOLEAN MODE) ORDER BY relevance desc, p.`hits`


This older Tiki began YEARS ago (on 2.something?) and went through numerous updates, so far with no problems. The newer one started on 18 (or 12).

Interestingly, both databases have default collation set to utf8_general_ci.

When checking collation with

Copy to clipboard
SHOW TABLE STATUS


I found that almost all tables were set to utf8_unicode_ci, but some were not (galaxia_workitems,index_628bfa7e573fa,index_pref_de,tiki_activity_stream_rules,tiki_addon_profiles,tiki_credits_usage,tiki_galleries_scales,tiki_goal_events,tiki_h5p_contents,tiki_h5p_contents_libraries,tiki_hp5_libraries,tiki_h5_libaries_cachedassets,tiki_h5_libraries_hub_cache,tiki_h5_libraries_languages,tiki_h5_libraries_libraries (!),tiki_hp5_results,tiki_h5p_tmpfiles,tiki_object_scores,tiki_output,tiki_scheduler,tiki_scheduler_run,tiki_search_queries (!),tiki_stats,tiki_tabular_formats,tiki_user_monitors).

Now that looks like a bug in one of the upgrader scripts.

However, a look at the tables of the newer Tiki showed that there was only one table that used the same collation as the database's default: index_pref_de. All others were set to utf8_unicode_ci! Now that would then be a bug in the installation procedure...

I am not a SQL expert, but I would like to recommend that Tiki sets the default collation to whatever Tiki shall use in the future and then leaves the default (i.e. not declare individual collation). Any individual collation definition is prone to be a future source of trouble...

Files
  1. COLUMNS
  2. COLUMNS
  3. COLUMNS
  4. COLUMNS
Importance
10 high
Easy to solve?
5
Priority
50
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8149
Created
Friday 27 May, 2022 12:32:50 UTC
by hman
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages