Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.2, 5.5.30, 5.1.67, 5.2.14, 5.3.12
    • Fix Version/s: 5.5.34, 10.0.7
    • Component/s: None
    • Labels:

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              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.

              Show
              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.
              Hide
              serg Sergei Golubchik added a comment -

              merged MySQL's --binary-mode

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

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  serg Sergei Golubchik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: