Bug #28217 "UPPERCASE" Oracle table is migrated as "uppercase"
Submitted: 3 May 2007 11:32 Modified: 4 May 2007 8:34
Reporter: Valeriy Kravchuk Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.1.11 OS:Windows (XP SP2)
Assigned to: CPU Architecture:Any

[3 May 2007 11:32] Valeriy Kravchuk
Description:
Migration Toolkit does not pay attention to quoted identifiers in Oracle. They are migrated "lowercased".

How to repeat:
In Oracle:

SQL> create table "UPPERT" (c1 int);

Table created.

By default the following script is created for this table while migrating to 5.0.37 on Windows:

DROP TABLE IF EXISTS `scott`.`uppert`;
CREATE TABLE `scott`.`uppert` (
  `c1` DECIMAL(22, 0) NULL
)
ENGINE = INNODB;

So, SQL statements that use "UPPERT" will not work correct with a migrated table.

Suggested fix:
Pay attention to quoted identifiers - they are case sensitive.
[4 May 2007 8:34] Michael G. Zinner
This is actually a feature, not a bug. The conversion to lowercase is performed on purpose because the de-facto standard for MySQL is to use lower case schema object names.

There are two ways to solve your problem. 

First, disable the case sensitivity on the MySQL server to mimic the Oracle behavior (which is also not case sensitive). Please see http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html

Second, if you really want uppercase identifiers and have Eclipse installed, open the project located in C:\Program Files\MySQL\MySQL GUI Tools 5.0\java\com\mysql\grt\modules and modify the class MigrationOracle.java located in C:\Program Files\MySQL\MySQL GUI Tools 5.0\java\com\mysql\grt\modules and change the following function.

	/**
	 * migrates the name of an identifier
	 * 
	 * @param name
	 *            the source name of the identifier
	 * @return the migrated identifier name
	 */
	protected String migrateIdentifier(String name) {
		return name.toLowerCase();
	}

to 

	protected String migrateIdentifier(String name) {
		return name;
	}

and save the file which will trigger a recompilation. Restart the Migration Toolkit and perform the migration process.