From ab2d29ec6b84eb4531d2d63887ac29f7d9617e60 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Fri, 14 Jan 2011 19:50:34 +0530 Subject: Bug#13618 : mysqldump --xml omits comment on table field When mysqldump tries to dump information in xml format, the result does not contain field level comments. In order to retrieve various informations for a field/column, mysqldump currently uses 'show fields from ' statement. The attributes returned by the statement lacks the information regarding field comments. Fixed by changing the query to one that probes I_S to retrieve required field informations, including the field comment. client/mysqldump.c: Bug#13618 : mysqldump --xml omits comment on table field. Replaced the 'show fields' command by a statement that queries I_S, in order to retrieve information on all the attributes that 'show fields' returns along-with an additional column_comment information. mysql-test/r/client_xml.result: Result modifications for bug#13618. mysql-test/r/mysqldump.result: Result modifications for bug#13618. mysql-test/t/mysqldump.test: Added a testcase for bug#13618. --- mysql-test/t/mysqldump.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t/mysqldump.test') diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 9246d488dd8..fe0b05dbb42 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -2164,6 +2164,15 @@ SELECT LENGTH(a) FROM t2; DROP TABLE t1, t2; ########################################################################### + +--echo # +--echo # Bug #13618 : mysqldump --xml ommit comment on table field +--echo # + +CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT'; +--exec $MYSQL_DUMP --compact --skip-create --xml test +DROP TABLE `comment_table`; + --echo # --echo # End of 5.1 tests --echo # -- cgit v1.2.1