Bug #16776 mysqldump fails to give table structures with --tab option
Submitted: 25 Jan 2006 12:27 Modified: 25 Feb 2006 13:00
Reporter: Tobias Asplund Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.0.18 OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[25 Jan 2006 12:27] Tobias Asplund
Description:
the --tab option to mysqldump has historically given a .sql file with the table definition and a .txt file with a tabseparated dump of the rows of the table.
This seems to have stopped to work properly in the later releases (not sure when exactly this stopped, however).

How to repeat:
C:\bug>mysqldump --tab=C:\bug world
Enter password: ****

C:\bug>ls
americas.sql         country.txt          na.txt
city.sql             countrylanguage.sql  sa.sql
city.txt             countrylanguage.txt  sa.txt
country.sql          na.sql

C:\bug>cat city.sql
-- MySQL dump 10.10
--
-- Host: localhost    Database: world
-- ------------------------------------------------------
-- Server version       5.0.18-nt-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
[25 Jan 2006 13:00] MySQL Verification Team
I was unable to repeat with a single test aside of the world DB:

c:\mysql\bin>mysqladmin -uroot create db10

c:\mysql\bin>mysql -uroot db10
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6 to server version: 5.0.18-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table tb1 (id int, name char(10));
Query OK, 0 rows affected (0.25 sec)

mysql> exit
Bye

c:\mysql\bin>mysqldump -uroot --tab=c:\temp db10

c:\mysql\bin>type c:\temp\tb1.sql
-- MySQL dump 10.10
--
-- Host: localhost    Database: db10
-- ------------------------------------------------------
-- Server version       5.0.18-nt

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `tb1`
--

DROP TABLE IF EXISTS `tb1`;
CREATE TABLE `tb1` (
  `id` int(11) default NULL,
  `name` char(10) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

c:\mysql\bin>
[26 Feb 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".