Testing
Oninit® MySQL-2-Informix — Testing
The proxy is validated against IBM Informix Dynamic Server through three layers, each gating a different class of work.
Pure-C unit tests
A pure-C unit-test suite covers SQL normalisation, classification, translation, and license-key generation / verification. No Informix server, no client library, no network. This is the gate for any classifier or translator change — if a change moves the output of an existing translation, it shows up here first.
The pure-C suite stays green without an Informix install. That's the minimum bar for translator work and the contract that lets contributors validate translator changes on a laptop.
Integration suite via mysql(1)
The integration suite is driven through the standard MySQL client against a live Informix backend. It covers catalog translation, type-mapping round-trip, DML, DDL, USE database, the built-in responses, and the full BYTE / TEXT INSERT surface (positional, column-list, multi-row, NULL-into-blob, schema-cache invalidation on DDL).
# Default backend, port 3307 ./m2i start ./test_integ.sh
The suite creates and tears down a dedicated oninit database, so it does not pollute application data. Run it against a non-production IDS instance.
Backend comparison
The two backends produce the same MySQL-wire output for the same SQL on most rows; a small documented set of behaviours where the SQLI-protocol backend is strictly more correct than the ESQL/CSDK reference is captured on the Backends page. To run the integration suite against each backend in turn:
./m2i start # ESQL backend on default port ./test_integ.sh M2I_BINARY=./m2is M2I_PORT=3308 ./m2i start # SQLI backend on 3308 M2I_PORT=3308 ./test_integ.sh
SQL tracing
A debug build of the proxy logs every SQL statement sent to the Informix backend on standard error. Useful when tracing how a specific MySQL-side query is being classified, translated, or forwarded; pair with the integration suite for reproducible runs. The shipped README in the source tree lists the exact build invocation that enables it.
What “done” looks like for a change
- Classification or translation change: a new pure-C test case that passes.
- Wire-path change: a new integration case that passes on both backends (or a documented entry in the “SQLI-protocol backend strictly more correct” list above when CSDK can't keep up).
- SQLI library change: a new library-side test, with both backends still in agreement on every case they matched before.