Oninit® MySQL-2-Informix
The Oninit® MySQL-2-Informix proxy (m2i) is a wire-protocol gateway that lets any standard MySQL client — mysql(1), JDBC, ODBC, the Connector/Python driver, an ORM, an existing application — talk to an IBM Informix database without modification. The proxy speaks the MySQL 4.1 protocol on the front end, classifies and translates each statement, and dispatches it to Informix on the back end.
The result is that an existing MySQL-shaped application can read and write Informix data with no application change, no driver swap, and no client-library replacement. Catalog queries (SHOW DATABASES, SHOW TABLES, SHOW CREATE TABLE, SHOW INDEX, SHOW GRANTS, SHOW TRIGGERS, SHOW CREATE VIEW, SHOW CREATE TRIGGER) are rewritten as SELECTs over the Informix system catalog. CREATE TABLE is column-by-column type-rewritten to its Informix equivalent. Built-ins like SELECT VERSION(), SELECT USER(), SELECT DATABASE(), and SELECT 1 answer locally without an Informix round-trip. Other DML — UPDATE, DELETE, generic SELECT, and other DDL — is forwarded verbatim. INSERT into BYTE / TEXT columns is rewritten to the bound-INSERT wire form under the SQLI-protocol backend so MySQL clients sending inline binary literals work end to end.
The proxy ships with two interchangeable backends behind a single configuration file: m2ie uses the IBM Informix CSDK (ESQL/C), and m2is speaks the SQLI wire protocol directly in pure C with no CSDK dependency on the deployment host. They produce the same MySQL-wire responses for the same SQL, with one documented exception: a small set of behaviours where the SQLI- protocol backend is strictly more correct than the ESQL/CSDK reference (see the Backends page for the list).
Architecture
MySQL client mysql2informix proxy Informix
—————— MySQL 4.1 wire └────────────┘ ESQL/C └────────┘
mysql(1) ———————————————— | Handshake | ———————————— | |
JDBC/ODBC | Classify SQL | | IDS / |
any MySQL ⇐——————————————— | Translate | ⇐——————————— | IFMX |
connector result sets | Dispatch | result sets | |
—————— ├─────────────┤ ├─────────┤
127.0.0.1:3307 (default)
Each accepted client connection runs in its own pthread. The translation pipeline is pure C and free of any Informix dependency at the classifier / translator layer.
At a glance
| Topic | Detail |
|---|---|
| Front-end protocol | MySQL 4.1 wire — handshake, capability flags, query, result-set, prepared-statement-free path. Existing clients connect unchanged. |
| Back-end | Two interchangeable backends: m2ie via Informix ESQL/C and m2is via the SQLI wire protocol (pure C, no CSDK). |
| Catalog translation | SHOW DATABASES, SHOW TABLES, SHOW CREATE TABLE, SHOW INDEX FROM, SHOW GRANTS, SHOW TRIGGERS, SHOW CREATE VIEW, SHOW CREATE TRIGGER — rewritten as SELECTs over the Informix system catalog (sysmaster / systables / syscolumns / sysindexes / sysconstraints / systriggers / systrigbody / sysviews / systabauth). |
| Built-in responses | SELECT 1, SELECT VERSION() / SHOW VERSION, SELECT USER(), SELECT DATABASE() answer locally with no Informix round-trip. |
| DDL rewriting | CREATE TABLE is rewritten column-by-column from MySQL types to Informix. The reverse mapping is applied by SHOW CREATE TABLE so the output reads MySQL-shaped. |
| Database management | CREATE DATABASE [WITH BUFFERED LOG], DROP DATABASE [IF EXISTS], and USE <db> / COM_INIT_DB reconnect the Informix session to the named database. |
| BYTE / TEXT INSERT routing | Inline-literal INSERTs into BYTE / TEXT columns are rewritten to the bound-INSERT wire form under m2is; the MySQL client sees a normal INSERT round-trip with the affected-row count. See Features for the full coverage. |
| Other DML | UPDATE, DELETE, generic SELECT, and other DDL forward verbatim. SELECT via cursor; DML returns an OK packet with affected rows. |
| Concurrency | One pthread per accepted MySQL client connection. Each connection holds its own Informix backend session. |
| Listening port | Default 127.0.0.1:3307. Both backends can run side by side on different ports. |
| Validation | Validated against IBM Informix Dynamic Server through a unit test suite and an integration suite via mysql(1) — see Testing. |
| License | Pure-C SHA-256 / HMAC-SHA256 license key validated at start-up. No OpenSSL dependency. |
Why use it
Most teams who need MySQL-shaped access to Informix data end up maintaining a parallel application stack, a per-driver translator, or a brittle ETL pipeline. The proxy collapses that into a single small daemon: the application keeps speaking MySQL, the database stays Informix, and the translation surface is exposed as a documented, type-mapped table.
The two-backend model means the same proxy can be deployed in either of two operational stances: m2ie when an Informix CSDK install on the proxy host is acceptable, or m2is when the deployment host should carry no IBM dependency at all (container images, locked-down hosts, environments where licensing the CSDK on every proxy node is undesirable).