summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqldump.test
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay.choubey@sun.com>2011-01-14 19:50:34 +0530
committerNirbhay Choubey <nirbhay.choubey@sun.com>2011-01-14 19:50:34 +0530
commitab2d29ec6b84eb4531d2d63887ac29f7d9617e60 (patch)
treeacc6315fad9570b276eedcd05fbeb423913afaec /mysql-test/t/mysqldump.test
parentfaafae781adc87d80dc0e7c5e631996ed015f8ed (diff)
downloadmariadb-git-ab2d29ec6b84eb4531d2d63887ac29f7d9617e60.tar.gz
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 <tab>' 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.
Diffstat (limited to 'mysql-test/t/mysqldump.test')
-rw-r--r--mysql-test/t/mysqldump.test9
1 files changed, 9 insertions, 0 deletions
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 #