mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
@@ -1412,6 +1412,21 @@ insert into t1 values (0815, 4711, 2006);
|
||||
DROP TABLE `t1`;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # Bug #19745: mysqldump --xml produces invalid xml
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB);
|
||||
INSERT INTO t1 VALUES(1,0xff00fef0);
|
||||
|
||||
--exec $MYSQL_DUMP --xml --hex-blob --skip-create-options test t1
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
||||
Reference in New Issue
Block a user