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.
The problem is that since MyISAM's concurrent_insert is on by
default some concurrent SELECT statements might not see changes
made by INSERT statements in other connections, even if the
INSERT statement has returned.
The solution is to disable concurrent_insert so that INSERT
statements returns after the data is actually visible to other
statements.
mysql-test/r/client_xml.result:
Update test case result.
mysql-test/r/federated.result:
Update test case result.
mysql-test/r/federated_bug_25714.result:
Update test case result.
mysql-test/t/client_xml.test:
Disable concurrent insert and restore old value at the
end of the test so it doesn't affect other tests.
mysql-test/t/federated.test:
Disable concurrent insert and restore old value at the
end of the test so it doesn't affect other tests.
mysql-test/t/federated_bug_25714.test:
Disable concurrent insert and restore old value at the
end of the test so it doesn't affect other tests.
Problem: output was empty if the result is empty.
Fix: print XML header and footer, even if the result
is empty, to produce well-formed XML output.
client/mysql.cc:
Print header and footer even on empty set, when --xml
mysql-test/r/client_xml.result:
Adding test case
mysql-test/t/client_xml.test:
Adding test case
Fix: adding namespace reference into "mysql --xml" output,
to make it work similary to "mysqldump --xml".
client/mysql.cc:
Adding namespace reference.
mysql-test/r/client_xml.result:
Fixing test results
Fix: "mysql --xml" now print NULL values the same way that "mysqldump --xml" does:
<field name="name" xsi:nil="true" />
to distinguish from empty strings:
<field name="name"></field>
and from string "NULL":
<field name="name">NULL</field>
client/mysql.cc:
Fixing to print NULLs differently from empty strings
mysql-test/r/client_xml.result:
Fixing test result accordingly
tool does, with the column names as attributes on <field>
elements, instead of trying to use the column name as the
element name. Also fix some encoding issues. (Bug #7811)
client/mysql.cc:
Quote > and " in XML output, and use <field name="XXX"></field>
instead of <XXX></XXX>, to make the output more like
mysqldump --xml and avoid having to turn XXX into a sensible
element name.