DB2 for i file objects have both a short (10-character) system name and an SQL name. The DB2 for i SQL name is always the same as the MySQL name. However, because MySQL's sensitivity to the letter case of schema and table names depends on the file system containing the datadir, mapping the MySQL name to the system name of the corresponding DB2 for i object must account for several factors, described below.
When MySQL is operating in a case-sensitive mode (that is,
datadir is in a case-sensitive file-system like (/QOpenSys), the
case of the system name of the IBMDB2I
object
reflects the case of the name specified to MySQL. If the object
has all uppercase characters and is equal to or less than 10
characters in length, the system name will be undelimited and in
uppercase.If the object name has mixed or lower-case letters,
the IBM i system name will contain up to 8 characters of the
name in the specified case and will be delimited by surrounding
quotation marks. If the MySQL name has more characters than can
fit in the delimited system name, the system name will be
generated as a mangled name delimited by surrounding quotation
marks.
Examples of this naming behavior are given below:
Table 13.6. Naming Behavior in DB2 Storage Engine
MySQL name | DB2 for i SQL name | IBM i System name |
---|---|---|
mytable | mytable | "mytable" |
mylongertable | mylongertable | "mylo0001" |
UPPERTABLE | UPPERTABLE | UPPERTABLE |
UPPERLONGTABLE | UPPERLONGTABLE | UPPER00001 |
MixedTab | MixedTab | "MixedTab" |
MixedlongerTab | MixedlongerTab | "Mixe0001" |
If MySQL is operating in a case-insensitive mode, the IBM i system name will contain up to 8 characters of the name in lower case and will be delimited by surrounding quotation marks. If the MySQL name has more characters than can fit in the delimited system name, the system name will be generated as a mangled name delimited by surrounding quotation marks.
Note that IBM i system names are not changed when a RENAME TABLE command is executed. Only the DB2 for i SQL name changes.
User Comments
Add your own comment.