From 016a7d4c636de66246f443eade4a76ac75b52173 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Oct 2006 18:43:51 -0400 Subject: Bug#19745: mysqldump --xml produces invalid xml The mysqldump command with both the --xml and --hex-blob options will output blob data encoded as hexBinary. The proper XML datatype is xs:hexBinary. The correct XML datatype is specified be setting the xsi_type attribute equal to xs:hexBinary for each encoded element. client/mysqldump.c: Bug#19745: mysqldump --xml produces invalid xml - Moved hex-blob code to it's own function. - Rewrote print_xml_tag function to accept zero or more attribute/value pair(s) which are appended to a separate tag name. - --xml option respects the --hex-blob option by ouputting blob data in hex encoded format. Each hex encoded field tag will also contain an xsi:type attribute with an xs:hexBinary value. - --extended-insert and --xml are mutually exclusive. Otherwise, the xml file will contain INSERT commands. - Minor comment cleanup. mysql-test/r/mysqldump.result: Bug#19745: mysqldump --xml produces invalid xml -Added results. mysql-test/t/mysqldump.test: Bug#19745: mysqldump --xml produces invalid xml -Added test. --- mysql-test/r/mysqldump.result | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'mysql-test/r/mysqldump.result') diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index ee50fc42203..54583febbc8 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3196,5 +3196,27 @@ UNLOCK TABLES; DROP TABLE `t1`; # +# Bug #19745: mysqldump --xml produces invalid xml +# +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB); +INSERT INTO t1 VALUES(1,0xff00fef0); + + + + + + + + + + 1 + FF00FEF0 + + + + +DROP TABLE t1; +# # End of 5.0 tests # -- cgit v1.2.1