Bug #6680 mysqldump for windows generates sql-script with inconsistent name casing
Submitted: 17 Nov 2004 11:23 Modified: 17 Nov 2004 16:49
Reporter: Victor Vagin Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:4.0 OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[17 Nov 2004 11:23] Victor Vagin
Description:
mysqldump for windows generates wrong sql-script for unix..

if i create a table in uppercase and then try to backup it,
mysqldump uses uppercase for drop table and lowercase for create table

G:\mysql_distribs\mysql-4.1\bin>echo create table test.T1(a int) | mysql.exe --port=3308 --user=root

G:\mysql_distribs\mysql-4.1\bin>mysqldump.exe --no-data --port=3308 test T1

-- MySQL dump 10.8
--
-- Host: localhost    Database: test
-- ------------------------------------------------------
-- Server version       4.0.20a-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 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;

--
-- Table structure for table `T1`
--

DROP TABLE IF EXISTS `T1`;
CREATE TABLE `t1` (
  `a` int(11) default NULL
) TYPE=MyISAM;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;

How to repeat:
echo create table test.T1(a int) | mysql.exe --port=3308 --user=root
mysqldump.exe --no-data --port=3308 test

Suggested fix:
mysqldump for windows should convert table names to one representation
or should generate a mistake
[17 Nov 2004 11:32] Mike Lischke
I would like to add that changing the case of any name is not a good idea. Also on Windows file system objects can have a certain case in their names (e.g. you can very well give a folder the name "Temp" or "temp", both cases are preserved). Since names are not case sensitive when it comes to search etc. it is necessary to consider that when working with them. Still, the names should stay as the user has decided them to be.

Mike
[17 Nov 2004 16:49] MySQL Verification Team
Duplicate for #5185