Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.2, 5.5.30, 5.1.67, 5.2.14, 5.3.12
    • 5.5.34, 10.0.7
    • None

    Description

      in SBR mode mysqlbinlog prints the original query string, with the C API it's easy to generate INSERT statement that contains \0 or some other binary data, and that will break mysqlbinlog|mysql restore.

      See also the linked MySQL bug,

      Fix: mysqlbinlog should replace binary strings with their hexadecimal representation.

      Attachments

        Issue Links

          Activity

            this can be fixed in the mysqlbinlog — by escaping problematic characters (bad, doesn't always work with multi-byte eastern charsets), or by replacing the complete string literal with the hex notation (doesn't work for identifiers).

            this can be fixed in the mysql client — by not treating problematic characters specially, when loading from a file (breaks loading sql dumps created on windows), or with a special "binary" mode (upstream fix).

            Or, perhaps, in both — binary mode in the mysql client, a \B command to enable it, and mysqlbinlog putting \B in all dumps. At least the user won't need to remember the binary mode, unless she wants to apply only a part of the dump.

            serg Sergei Golubchik added a comment - this can be fixed in the mysqlbinlog — by escaping problematic characters (bad, doesn't always work with multi-byte eastern charsets), or by replacing the complete string literal with the hex notation (doesn't work for identifiers). this can be fixed in the mysql client — by not treating problematic characters specially, when loading from a file (breaks loading sql dumps created on windows), or with a special "binary" mode (upstream fix). Or, perhaps, in both — binary mode in the mysql client, a \B command to enable it, and mysqlbinlog putting \B in all dumps. At least the user won't need to remember the binary mode, unless she wants to apply only a part of the dump.

            merged MySQL's --binary-mode

            serg Sergei Golubchik added a comment - merged MySQL's --binary-mode

            People

              serg Sergei Golubchik
              serg Sergei Golubchik
              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.