5.2.8.MySQL
OpenLink Lite Drivers for Unix can be configured in 3 ways:
| Web Based Wizard |
| Web Based Forms |
| Manually |
Once you have configured the generic parts of the data source using one of the above listed methods, you will need to define the driver environment. Below are the common options with their descriptions for the environment section:
[Environment MySQL]
CURSOR_SENSITIVITY = LOW ; Set to HIGH after loading oplrvc.sql
;ODBC_CATALOGS = Y ; Uncomment after loading odbccat defs
The following options can be used in the ConnectOptions or Options field of the client configuration:
-
-H <hostname>. Connect to server running on <hostname>. This defaults to localhost if unspecified
-
-P <port>. Contact server on port <port>, which defaults to (3306) is unspecified.
-
-T. Disable all ODBC transaction support. The driver will never issue any extra statements for transaction management (commit, rollback, modification of transaction isolation level)
Datatype Mapping from ODBC Datatypes to MySQL Datatypes
This information can be queried by the SQLTypeInfo catalog call.
Table5.4.Default Rule Book settings
| SQL type | MySQL type |
|---|---|
| SQL_CHAR | char |
| SQL_VARCHAR | varchar |
| SQL_LONGVARCHAR | text |
| SQL_DECIMAL | decimal |
| SQL_NUMERIC | decimal |
| SQL_BIT | not supported |
| SQL_TINYINT | tinyint |
| SQL_SMALLINT | smallint |
| SQL_INTEGER | integer |
| SQL_BIGINT | bigint |
| SQL_REAL | real |
| SQL_DOUBLE | double |
| SQL_FLOAT | double |
| SQL_BINARY | tinyblob |
| SQL_VARBINARY | tinyblob |
| SQL_LONGVARBINARY | longblob |
| SQL_DATE | date |
| SQL_TIME | time |
| SQL_TIMESTAMP | timestamp |
Datatype Mapping from MySQL Datatypes to ODBC Datatypes
This information can be queried by the SQLColumns catalog call.
Table5.5.Default Rule Book settings
| MySQL type | SQL type | Precision |
|---|---|---|
| bigint | SQL_BIGINT | 19 |
| blob | SQL_VARBINARY | 2^16-1 |
| char(n) | SQL_CHAR | n |
| date | SQL_CHAR | 32 |
| datetime | SQL_CHAR | 32 |
| decimal(p,s) | SQL_DECIMAL | p |
| double | SQL_DOUBLE | 15 |
| enum | SQL_VARCHAR | 255 |
| float | SQL_REAL | 7 |
| int | SQL_INTEGER | 10 |
| longblob | SQL_LONGVARBINARY | 2^32-1 |
| longtext | SQL_LONGVARCHAR | 2^32-1 |
| mediumblob | SQL_VARBINARY | 2^24-1 |
| mediumint | SQL_INTEGER | 8 |
| mediumtext | SQL_LONGVARCHAR | 2^24-1 |
| set | SQL_VARCHAR | 255 |
| smallint | SQL_SMALLINT | 5 |
| text | SQL_LONGVARCHAR | 2^16-1 |
| time | SQL_VARCHAR | 32 |
| timestamp(n) | SQL_VARCHAR | n |
| tinyblob | SQL_VARBINARY | 255 |
| tinyint | SQL_TINYINT | 3 |
| tinytext | SQL_VARCHAR | 255 |
| varchar(n) | SQL_VARCHAR | n |
| varchar(n) binary | SQL_VARCHAR | n |
| year | SQL_VARCHAR | 4 |