Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.2.14
    • N/A
    • Backup
    • windows 2016

    Description

      I installed mariadb-10.2.14 (use utf8 as default character set)
      I did mysqldump (test database)
      I tried to do restore, it failed

      please find screenshots attached

      Attachments

        Activity

          Well, is \0 expected, and if it is, did you try to set --binary-mode as the message suggests?

          elenst Elena Stepanova added a comment - Well, is \0 expected, and if it is, did you try to set --binary-mode as the message suggests?

          the issue was because of powershell (see blue screen).

          powershell ">" is different from cmd ">"

          when run from cmd - everything is ok

          chipitsine Ilya Shipitsin added a comment - the issue was because of powershell (see blue screen). powershell ">" is different from cmd ">" when run from cmd - everything is ok

          wlad, any comments on this?

          elenst Elena Stepanova added a comment - wlad , any comments on this?
          wlad Vladislav Vaintroub added a comment - - edited

          there is --result-file option in mysqldump that can/shall be used with mysqldump, instead of redirection

          wlad Vladislav Vaintroub added a comment - - edited there is --result-file option in mysqldump that can/shall be used with mysqldump, instead of redirection

          I guess there's BOM
          will have a look later

          does it make sense to teach mysql.exe to understand BOM ? or just close this issue ?

          chipitsine Ilya Shipitsin added a comment - I guess there's BOM will have a look later does it make sense to teach mysql.exe to understand BOM ? or just close this issue ?

          --result-file should not write a BOM. Does it?
          I'd prefer some better raw pipe handling in powershell, along the lines of https://github.com/PowerShell/PowerShell/issues/1908.

          I'd like to redirect the questions about whether mysql understands UTF16, and question concerning BOMs to bar

          wlad Vladislav Vaintroub added a comment - --result-file should not write a BOM. Does it? I'd prefer some better raw pipe handling in powershell, along the lines of https://github.com/PowerShell/PowerShell/issues/1908 . I'd like to redirect the questions about whether mysql understands UTF16, and question concerning BOMs to bar

          "--result-file should not write a BOM. Does it?" - I was talking about powershell

          chipitsine Ilya Shipitsin added a comment - "--result-file should not write a BOM. Does it?" - I was talking about powershell

          there is a section in MySQL's documentation dedicated to this very topic https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
          about mysqldump and powershell and UTF16.
          Let me quote it in full

           Note
           
          A dump made using PowerShell on Windows with output redirection creates a file that has UTF-16 encoding:
           
          shell> mysqldump [options] > dump.sql
           
          However, UTF-16 is not permitted as a connection character set (see Section 10.4, “Connection Character Sets and Collations”), so the dump file will not load correctly. To work around this issue, use the --result-file option, which creates the output in ASCII format:
           
          shell> mysqldump [options] --result-file=dump.sql
          

          it specifically mentions --result-file as a workaround.

          wlad Vladislav Vaintroub added a comment - there is a section in MySQL's documentation dedicated to this very topic https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html about mysqldump and powershell and UTF16. Let me quote it in full Note   A dump made using PowerShell on Windows with output redirection creates a file that has UTF-16 encoding:   shell> mysqldump [options] > dump.sql   However, UTF-16 is not permitted as a connection character set (see Section 10.4, “Connection Character Sets and Collations”), so the dump file will not load correctly. To work around this issue, use the --result-file option, which creates the output in ASCII format:   shell> mysqldump [options] --result-file=dump.sql it specifically mentions --result-file as a workaround.

          People

            Unassigned Unassigned
            chipitsine Ilya Shipitsin
            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.