Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29156

mysql.proc is corrupt - has encoding utf8mb4 expecting utf8mb3

    XMLWordPrintable

    Details

      Description

      I have set all default character sets to utf8mb4, for quite a few years. When trying to upgrade from 10.6 to 10.7, or even when use mariadb-backup to backup and restore to a new server, I get the following errors at start up, or running mariadb-upgrade

      2022-07-22 19:32:09 15 [ERROR] Incorrect definition of table mysql.proc: expected the type of column 'db' at position 0 to have character set 'utf8mb3' but found character set 'utf8mb4'.
      2022-07-22 19:32:09 15 [ERROR] Incorrect definition of table mysql.event: expected the type of column 'name' at position 1 to have character set 'utf8mb3' but found character set 'utf8mb4'.
      2022-07-22 19:32:09 15 [ERROR] Incorrect definition of table mysql.event: expected the type of column 'definer' at position 3 to have character set 'utf8mb3' but found character set 'utf8mb4'.
      2022-07-22 19:32:09 15 [ERROR] Incorrect definition of table mysql.event: expected the type of column 'character_set_client' at position 18 to have character set 'utf8mb3' but found character set 'utf8mb4'.
      2022-07-22 19:32:09 15 [ERROR] Incorrect definition of table mysql.event: expected the type of column 'collation_connection' at position 19 to have character set 'utf8mb3' but found character set 'utf8mb4'.
      2022-07-22 19:32:09 15 [ERROR] Incorrect definition of table mysql.event: expected the type of column 'db_collation' at position 20 to have character set 'utf8mb3' but found character set 'utf8mb4'.

      I can alter this table and then dump it with mysqldump and i'll see the character set correctly as utf8mb3. But if i restart the server it goes back to utf8mb4. Also if i run mysql-upgrade on a new upgraded 10.6->10.7 it will do the same thing, if i dump it right before proc shows all character sets as utf8mb3, after it will show utf8mb4, just like a restart and the upgrade fails.

      I have removed the default character set from the server configuration, but that behaves the same way. I noticed in Index.xml of charsets, there is only a utf8mb3, not sure if that is important, but saw a note on another issue.

      I'm guessing it may have something to do with https://jira.mariadb.org/browse/MDEV-26863, as that is the only thing i can find that comes close to this issue.

      I have gotten around this on a single server restores/rebuilds, i'll update this with that detail, but on the production and staging clusters its an upgrade blocker.

      I'm hoping i'm in some odd state and that someone can simply help me get out of it. But also thought it may be a bug from the utf8->utf8mb3 change. as these tables have been utf8mb4 for years from setting the default character set on the server and client, rather than just utf8.

      Thanks for all you do.

        Attachments

        1. db04_dpkg.txt
          2 kB
        2. db05_dpkg.txt
          2 kB
        3. db4_proc_after_sst_and_restart.sql
          4 kB
        4. db4_proc_after_sst_and_restart-1.sql
          4 kB
        5. db5_proc_after_sst.sql
          4 kB
        6. dbreplica_dpkg.out
          2 kB
        7. mariadb_post_reload_dpkg.out
          2 kB
        8. proc.frm
          4 kB
        9. proc.MAD
          8 kB
        10. proc.MAI
          8 kB
        11. restore_target_dpkg.out
          2 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ekydfejj Jeff Dyke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.