# Internet SQL 1.23 — release notes

x64 Windows. Reads a 1.22 database unchanged and keeps the same C API, so an
existing home and an existing application need no work.

Version numbering starts being enforced with this release: `h/isqlversion.h`
is the single definition, `VERSION` carries the same string for build scripts,
and `tests\lib\checkversion.ps1` fails if any copy — including what the shipped
binaries print — disagrees. Before this, one release announced three different
versions: the shells said `Version 2.0`, the engine sent `Version 1.22` to
clients, and the shell printed `1.22`.

---

## Fixed

**Teardown no longer crashes.** `ISQL_DeleteInstance` faulted with an access
violation on every call, by two separate routes. `StoptLog` dereferenced `obj`
without a NULL check, which is what happens when the caller frees its objects
before tearing the instance down — the documented order, and what the C
examples, every ICPP script and LocShell all do. For callers that still held an
object, `DeleteInternetSqlInstance` had already `fclose`d `slot->logfp` without
clearing it, so the same `FILE*` was closed twice. The fault happened *after*
the data was committed, so it read as a random exit rather than a teardown bug.

**More than one engine process now works.** Four globals — including two kernel
handles and a heap pointer — were in a data section linked `RWS`, i.e. shared
between every process that loaded the DLL. Handles and pointers are
process-local by definition, so a second process took the "already initialised"
branch and waited on a handle belonging to another process, failing with
`ERROR_ACCESS_DENIED`. In practice that meant no client could run on the same
machine as the server, and two shells could not overlap. Cross-process
coordination now happens through the mutex *name*, which is the only mechanism
that crosses a process boundary.

**The ICPP web tier stopped littering the web root.** Rendering a page left the
compiler's `.asm`, `.error` and analysis files next to the page, in what is
usually `htdocs`, where they were very likely fetchable over HTTP.

**`icpptpl` can find its interpreter.** It defaulted to a Debug build path on
the author's machine, so every Apache request for an `.icpp.html` page returned
a `cmd` error inside the HTML. It now resolves the interpreter the way
`icpp.exe` does: explicit argument, `$KCPP_EXE`, alongside itself, then `PATH`.

## Added

**`isqlsh.exe` — a scriptable command-line shell.** No front end could run a
file of statements: the older shells are windowed, and `shell.exe` — despite
the name — is a local windowed shell, not a network client. `isqlsh` runs
embedded (`-h <home>`) or against a server (`-s <ip> -l user,pass`), takes a
file with `-f`, prints values only with `-q`, stops at the first failure with
`-e`, and **exits non-zero if any statement failed**, so it drops into a build
script. A UTF-8 BOM at the start of a `.sql` file is ignored, which Notepad and
PowerShell's `Set-Content` both produce.

**`-config` on both programs**, with deliberately different semantics. The
engine builds its config path itself and will read nothing else, so
`isqlserverd -config F` *installs* `F` as the working directory's
`KAMRANGA.CFG`, keeping the previous one as `.bak`. `isqlsh -config F` only
*reads* `F` and applies the values as arguments, writing nothing.

**The server tier ships in the drops.** `isqlserver.exe`, `isqlserverd.exe`,
`shell.exe` and a documented `KAMRANGA.CFG` are now included; previously
neither drop contained a server at all.

**A user manual**, `docs/SERVER_AND_SHELL.md`, covering both programs, the
config format, a worked embedded-then-served example, and the failures that
actually occur.

## Changed

- Build scripts derive their root from their own location. Five hard-coded
  `C:\ai\claude\isql1.22`, so a checkout anywhere else silently rebuilt the
  *original* tree — and a verification build overwrote the copy it was meant to
  be compared against.
- The import library is regenerated with the DLL. It had been four days older
  than the engine it accompanied; it was still correct, because the linker only
  rewrites it when exports change, but it was a trap for the day they do.
- Stale 32-bit build outputs removed from the tree. Everything shipped is x64;
  the deliberate 32-bit engine build (`isqldll32.dll`) stays, because 32-bit
  remains a supported *host* for future self-hosting.

## Known limitations

- `isqlsh -s` against a port with nothing listening blocks rather than timing
  out — there is no connect timeout in the engine.
- `locshell.exe` exits with an access violation on its window-close path.
  `isqlsh` and `shellonlib.exe` are unaffected.
- `create table … recordformat=vlr` is not implemented.
- The PHP interface has never been built; its source targets the PHP 4 Zend API.

## Verification

Both drops are verified by extracting the shipped archive and running it as a
user would, not by testing the tree they were built from:

| | |
|---|---|
| C API suite | 15 of 16 (the exception is the unimplemented VLR case) |
| ICPP/ISQL bridge | 9 of 9 |
| ICPP-in-HTML | 11 of 12 |
| SDK example, built against the shipped lib | 29 passed, 0 failed |
| Architecture gate | every binary in both archives is x64 |
