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

mariadb-upgrade fails with sql_safe_updates = on

    XMLWordPrintable

Details

    Description

      maridab-upgrade is failing if the server is configured with sql_safe_updates = on

      my.cnf

      [mysqld]
      sql_safe_updates  = on
      

      mariadb-upgrade returns:

      Phase 4/7: Running 'mysql_fix_privilege_tables'
      ERROR 1175 (HY000) at line 316: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
      ERROR 1175 (HY000) at line 328: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
      ERROR 1175 (HY000) at line 340: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
      ERROR 1175 (HY000) at line 352: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
      ERROR 1175 (HY000) at line 353: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
      ERROR 1175 (HY000) at line 477: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
      FATAL ERROR: Upgrade failed
      

      Additionally it's not possible to disable this for only the upgrade process. I attempted the following without success:

      my.cnf

      [mariadb-upgrade]
      sql_safe_updates  = off
      

      The issue can be mitigated by restarting the server with sql_safe_updates = off globally, running mariadb-upgrade then re-enabling it.

      It would be nice to be able to disable this for mariadb-upgrade only, rather than needing to disable it for the entire server.

      Attachments

        Activity

          People

            danblack Daniel Black
            anthonyryan1 Anthony Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.