1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #9558 mysqldump --no-data db t1 t2 format still dumps data

- Check the Dflag variable inside of function dump_table to see if data should be
dumped or not.
    - Add test for --xml and --no-data as well
    Reapplying patch!


client/mysqldump.c:
  Move the check of --no-data flag and "number of fields" inside of the dump_table
  function.
mysql-test/r/mysqldump.result:
  Update test results add ouput for --xml and --no-data
mysql-test/t/mysqldump.test:
  Add tests for XML and --no-data as well.
This commit is contained in:
unknown
2005-06-22 15:43:49 +02:00
parent 3790b7bc29
commit 4d99f7933a
3 changed files with 48 additions and 2 deletions

View File

@ -1529,6 +1529,28 @@ CREATE TABLE `t2` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
<?xml version="1.0"?>
<mysqldump>
<database name="mysqldump_test_db">
<table_structure name="t1">
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
</table_structure>
<table_structure name="t2">
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
</table_structure>
</database>
</mysqldump>
<?xml version="1.0"?>
<mysqldump>
<database name="mysqldump_test_db">
<table_structure name="t1">
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
</table_structure>
<table_structure name="t2">
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
</table_structure>
</database>
</mysqldump>
DROP TABLE t1, t2;
DROP DATABASE mysqldump_test_db;
create database mysqldump_test_db;

View File

@ -600,6 +600,8 @@ INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db
--exec $MYSQL_DUMP --skip-comments --no-data mysqldump_test_db t1 t2
--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db
--exec $MYSQL_DUMP --skip-comments --skip-create --xml --no-data mysqldump_test_db t1 t2
DROP TABLE t1, t2;
DROP DATABASE mysqldump_test_db;