Bug #48175 IBMDB2I generates mangled system column names
Submitted: 20 Oct 2009 2:46 Modified: 2 Feb 2013 14:08
Reporter: Tim Clark Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: DB2SE for IBM i Severity:S4 (Feature request)
Version: OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[20 Oct 2009 2:46] Tim Clark
Description:
The DB2 tables that provide storage for IBMDB2I tables have both short "system" names and long "SQL" names. Today, the SQL name for a column matches the name given the column through MySQL when the IBMDB2I table is created. However, the system name is generated automatically by DB2. When the SQL name is longer than 10 characters it is truncated and mangled to create the system name. When the SQL name is less than or equal to 10 characters and contains all upper-case characters, the system name is identical to the SQL name. When the SQL name is less than or equal to 10 characters and contains mixed-case characters, the system name is uppercased and mangled.

In other words,
LongColumnName => LONGC00001
SHORTNAME => SHORTNAME
ShortName => SHORT00001

In the latter case, it would be beneficial to traditional IBM i applications, such as those written in RPG, to have a system name that more closely matches the original SQL name. For long names, truncation and mangling are inevitable. But short mixed-case names should be created without mangling. In other words, ShortName should produce SHORTNAME.

How to repeat:
CREATE TABLE test.t1 (i int) ENGINE=IBMDB2I

Then, from a command line:
DSPFFD "test"."t1"
Observe that the name of the column is I____00001

Suggested fix:
Ensure that for columns in IBMDB2I tables, the system names more closely match the SQL name. This could be done by assigning system names that are the uppercase version of the SQL name for names of less than 11 characters.
[2 Feb 2013 14:08] MySQL Verification Team
we don't support this platform
http://www.mysql.com/support/eol-notice.html