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

mariadb-upgrade fails with sql_safe_updates = on

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

          anthonyryan1 Anthony Ryan created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          serg Sergei Golubchik made changes -
          Labels beginner-friendly
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.7 [ 24805 ]

          I would like to work on this issue.

          arunesh Arunesh Choudhary added a comment - I would like to work on this issue.
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.3 [ 22126 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.8 [ 26121 ]
          danblack Daniel Black added a comment -

          sure - set sql_safe_updates=off at the beginning of scripts/mariadb_system_tables_fix.sql and run some tests.

          danblack Daniel Black added a comment - sure - set sql_safe_updates=off at the beginning of scripts/mariadb_system_tables_fix.sql and run some tests.
          danblack Daniel Black made changes -
          Labels beginner-friendly Papercut beginner-friendly

          I'd like to work on this.

          ultravoilet26 Gulshan Kumar Prasad added a comment - I'd like to work on this.
          danblack Daniel Black added a comment -

          sure, looking forward to seeing the PR https://mariadb.com/kb/en/contributing-code/

          danblack Daniel Black added a comment - sure, looking forward to seeing the PR https://mariadb.com/kb/en/contributing-code/
          danblack Daniel Black made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          danblack Daniel Black made changes -
          Assignee Daniel Black [ danblack ]
          danblack Daniel Black added a comment - PR by anthonyryan1 for review - https://github.com/MariaDB/server/pull/2795
          danblack Daniel Black made changes -
          Assignee Daniel Black [ danblack ] Andrew Hutchings [ JIRAUSER52179 ]
          Status Confirmed [ 10101 ] In Review [ 10002 ]
          danblack Daniel Black made changes -
          issue.field.resolutiondate 2023-10-23 08:25:58.0 2023-10-23 08:25:57.632
          danblack Daniel Black made changes -
          Fix Version/s 10.4.32 [ 29300 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Assignee Andrew Hutchings [ JIRAUSER52179 ] Daniel Black [ danblack ]
          Resolution Fixed [ 1 ]
          Status In Review [ 10002 ] Closed [ 6 ]
          JIraAutomate JiraAutomate made changes -
          Fix Version/s 10.5.23 [ 29012 ]
          Fix Version/s 10.6.16 [ 29014 ]
          Fix Version/s 10.10.7 [ 29018 ]
          Fix Version/s 10.11.6 [ 29020 ]
          Fix Version/s 11.0.4 [ 29021 ]
          Fix Version/s 11.1.3 [ 29023 ]

          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.