<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16507</bug_id>
          
          <creation_ts>2026-11-15 00:30:46 +0000</creation_ts>
          <short_desc>layerindex-web: 31 database tables still use latin1, so text outside Latin-1 fails to save</short_desc>
          <delta_ts>2026-11-15 01:00:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Layer Index</product>
          <component>Layer Index</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.2 M2</target_milestone>
          
          <blocked>16476</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          
          
          <qa_contact name="apoorv sangal">apoorvsangal</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107457</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-11-15 00:30:46 +0000</bug_when>
    <thetext>In a copy of the layers.openembedded.org database (on the test instance
layers.moto-timo.net, MariaDB), 31 tables have a latin1_swedish_ci
default collation, with 65 latin1 text columns between them. The rest
of the database is utf8mb4. The latin1 tables include every RRS table
(rrs_maintainer, rrs_recipeupgrade, rrs_recipesymbol,
rrs_recipemaintainerhistory, rrs_recipeupstream, rrs_recipedistro,
rrs_milestone, rrs_release, ...) and several layer index ones
(layerindex_incfile, layerindex_staticbuilddep,
layerindex_dynamicbuilddep, layerindex_extendedprovide,
layerindex_packageconfig, layerindex_patchdisposition,
layerindex_userprofile, layerindex_securityquestion(answer),
layerindex_ypcompatibleversion) plus the axes tables. They were probably
created before the server default changed.

Text that can&apos;t be represented in Latin-1 then fails. For example,
rrs_upgrade_history.py fails on commits whose recipe maintainer has such
a name, in Maintainer.create_or_update():

  MySQLdb.OperationalError: (1267, &quot;Illegal mix of collations
  (latin1_swedish_ci,IMPLICIT) and (utf8mb4_uca1400_ai_ci,COERCIBLE)
  for operation &apos;=&apos;&quot;)

The run logs the error and carries on, so the upgrade record for that
commit is silently missing. The production schema has not been checked
directly yet.

Fix: convert these tables to utf8mb4 (ALTER TABLE ... CONVERT TO
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, after a backup), or
handle it as part of the move to Postgres (bug 16476).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107465</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-11-15 01:00:35 +0000</bug_when>
    <thetext>Correction to the description: the rest of the database isn&apos;t all
utf8mb4. On the test instance&apos;s copy of the production database the 73
tables are: latin1_swedish_ci 31 (65 columns), utf8mb3_unicode_ci 35
(104 columns), utf8mb4_unicode_ci 5 (11 columns), utf8mb4_0900_ai_ci 2
(5 columns).

Fixed on the test instance (layers.moto-timo.net) on 2026-11-15:
- Backed up the database with mariadb-dump --single-transaction.
- Merged two pairs of rrs_maintainer rows that collide in the unique
  index on name under utf8mb4_unicode_ci (latin1_swedish_ci treats o and
  ö as different letters). Each pair is the same person with the same
  email: &quot;Enrico Jorns&quot;/&quot;Enrico Jörns&quot; and &quot;Zoltan Boszormenyi&quot;/&quot;Zoltán
  Böszörményi&quot;. Their RecipeUpgrade and RecipeMaintainerHistory
  references were moved to the row the maintainers file uses.
- Converted the 31 tables with ALTER TABLE ... CONVERT TO CHARACTER SET
  utf8mb4 COLLATE utf8mb4_unicode_ci. No latin1 columns are left.

A maintainer name such as &quot;Łukasz Ślęzak 测试&quot; now saves, and
rrs_upgrade_history.py runs without the &quot;Illegal mix of collations&quot;
error. Production has not been changed yet. The scripts and steps are
kept with the layer index handoff notes.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>