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

mysqldump --skip-opt does not work with MySQL 8

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.4.34, 11.7.0
    • N/A
    • Scripts & Clients
    • None

    Description

      mysqldump: Couldn't execute 'SET SQL_QUOTE_SHOW_CREATE=1/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 ',NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */': Variable 'sql_mode' can't be set to the value of 'NO_KEY_OPTIONS' (1231)]
      

      This bug has already been reported and fixed by MySQL.

      Attachments

        Activity

          I'm not sure it's a bug. You use --skip-opt which, besides other things, means that mariadb-dump should not include table/field/index options into the table definition. MySQL has removed those sql_mode values, meaning, when you dump from MySQL, mariadb-dump is unable to do what you requested, the dump from MySQL will always include table/field/index options.

          MySQL "fix" was to ignore user's explicit request, see their commit, the test uses --skip-create-options and the dump contains create options regardless. This looks more like a bug "mysqldump ignores --skip-create-options", than the fix,

          I think an error is quite appropriate here, you asked mariadb-dump to do something that it cannot do.

          serg Sergei Golubchik added a comment - I'm not sure it's a bug. You use --skip-opt which, besides other things, means that mariadb-dump should not include table/field/index options into the table definition. MySQL has removed those sql_mode values, meaning, when you dump from MySQL, mariadb-dump is unable to do what you requested, the dump from MySQL will always include table/field/index options. MySQL "fix" was to ignore user's explicit request, see their commit, the test uses --skip-create-options and the dump contains create options regardless. This looks more like a bug "mysqldump ignores --skip-create-options", than the fix, I think an error is quite appropriate here, you asked mariadb-dump to do something that it cannot do.

          People

            serg Sergei Golubchik
            juanrgm Juanra GM
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.