Backends
Oninit® MySQL-2-Informix — Backends
The proxy ships with two backend strategies behind the same internal abstraction. They produce the same MySQL-wire output for the same SQL on every row in the standing test corpus, with one documented exception: a small set of behaviours where the SQLI- protocol backend is strictly more correct than the ESQL/CSDK reference. The choice between them is operational, not functional.
Side by side
| Property | m2ie (ESQL/C) | m2is (SQLI) |
|---|---|---|
| How it talks to Informix | Via the IBM Informix CSDK. ESQL/C source modules are preprocessed by the CSDK’s preprocessor before compilation; the same preprocessor is also used as the link driver, which pulls in the right Informix runtime libraries. | Pure C against the SQLI wire protocol over raw TCP sockets. No CSDK on the deployment host. |
| Build dependency | Requires INFORMIXDIR at build time so the CSDK preprocessor is on the path. | Requires only a C99 compiler. |
| Runtime dependency on the deployment host | Needs the CSDK installed ($INFORMIXDIR/lib and $INFORMIXDIR/lib/esql on LD_LIBRARY_PATH). | None. Pure C; libc + pthreads. |
| Connection model | One ESQL/C connection per accepted client connection. | One TCP socket per accepted client connection. Speaks SQLI directly: framing, login, prepare, describe, fetch. |
| INSERT into BYTE / TEXT columns | Inline-literal INSERTs (INSERT INTO t VALUES (1, 'data')) hit Informix Error 274 — the CSDK doesn't rewrite these as bound BLOB streams. | Routes via PREPARE + BIND + BBIND + SQ_BLOB stream + EXECUTE under the hood. The MySQL client sees a normal INSERT; the proxy generates the bound wire shape on the fly. Multi-row INSERTs and column-list INSERTs are handled by the same routing path. |
| Wire visibility | Opaque from the proxy's point of view — the CSDK handles framing internally. | Direct. Pair with the Oninit® Snooper to see every PFPDU on every connection. |
| Status | Reference implementation. Most translation behaviour is anchored to the ESQL backend's output. | Validated against IBM Informix Dynamic Server. Strictly more correct than the CSDK reference on the documented behaviours below. |
The shared contract
Both backends implement the same internal abstraction: connect / disconnect, execute non-row-returning SQL (DDL, EXECUTE PROCEDURE, etc.), execute row-returning SELECT through a cursor, execute INSERT / UPDATE / DELETE returning affected-row count, and run catalog-translated queries. The SQLI-protocol backend additionally carries a per-connection schema cache so the INSERT routing layer can decide between passthrough and the bound BLOB wire flow without re-reading syscolumns on every row.
Byte-identical baseline
For workloads that don't exercise any of the documented divergences below, the two backends produce byte-for-byte identical wire output. The integration suite carries an explicit baseline target that runs the subset of cases on which both backends agree and asserts the captured output diffs to zero. Practically this covers catalog translation, type-mapping round-trips, generic DML, DDL, USE database, the built-in responses, and most SELECT shapes. A deployment that only reads simple tabular data and writes non-blob INSERTs gets bit-for-bit matching results from either backend — the choice between them is operational, not behavioural. The four documented exceptions are listed below.
The portable SQLI library
A self-contained SQLI library underneath the SQLI-protocol backend provides codec, transport, login, tuple decoder, bind encoder, blob streamer, and a small client API. The library is also used by the Oninit® Snooper, where it provides the wire decoder.
When the SQLI-protocol backend is strictly more correct
The ESQL/CSDK reference cannot keep up with a small set of wire behaviours. The SQLI-protocol backend handles them via its own pure-C codec or, for INSERTs, via the bound BLOB wire flow:
- SELECT rows containing NULL columns — the CSDK collapses some NULL representations during cursor fetch.
- DATETIME HOUR TO SECOND with a negative interval — the CSDK's formatter renders the sign in the wrong position.
- BSON column wire stream — the CSDK's text-shaped path clips at the first embedded NUL, losing the rest of the document; the SQLI backend preserves the full byte stream end to end.
- Inline-literal INSERTs into BYTE / TEXT columns — the CSDK rejects the statement with Error 274; the SQLI backend rewrites it to a bound INSERT with a SQ_BLOB stream and the row lands.
When to pick which
| If | Pick |
|---|---|
| The proxy host already has a CSDK install and the IBM-dependency footprint is acceptable. | m2ie |
| The proxy ships in container images, on locked-down hosts, or as part of a fleet where licensing the CSDK on every node is undesirable. | m2is |
| You want full wire-level observability for the proxy-to-database conversation. | m2is + Snooper |
| The application INSERTs into BYTE / TEXT columns with inline literals (the common shape from a MySQL ORM batching binary payloads). | m2is — the routing layer handles it; the CSDK path returns Error 274. |
| You want every translation behaviour grounded in the IBM-supported client path. | m2ie |