You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,7 +176,8 @@ Per-feature deep-dives live under `docs/claude/`. Each entry below is a trigger:
176
176
## Not modeled
177
177
178
178
-**Key-range locks** — sole remaining phase 4+ deferral. See [`locking.md`](docs/claude/locking.md) for what does ship (full 8-mode matrix, SNAPSHOT/RCSI, DMVs, Msg 1205/1222/3952/3960).
179
-
-`BEGIN DISTRIBUTED TRANSACTION` / `BEGIN TRANSACTION ... WITH MARK` raise `NotSupportedException` at dispatch.
179
+
-`BEGIN DISTRIBUTED TRANSACTION` raises `NotSupportedException` at dispatch. `BEGIN TRANSACTION <name> WITH MARK 'm'` raises **Msg 319** at parse (the parser doesn't accept `WITH` here); bare named transactions (`BEGIN TRAN t1`) ship.
180
+
-**`CREATE DATABASE`** / **`CREATE ASSEMBLY`** — Msg 102 at parse. Adding databases routes through `Simulation.ImportBacpac`; CLR assemblies aren't modeled at all.
180
181
-**Cross-database DML** (`INSERT`/`UPDATE`/`DELETE`/`MERGE` through a 3-part name targeting a different database) raises `NotSupportedException` via `BatchContext.RejectCrossDatabaseMutation` — trigger scope swapping, identity allocation routing, undo-log scoping, FK validation across DB boundaries pending. Issue `USE <db>` and reference via a 1- or 2-part name. Cross-database SELECT / JOIN / catalog-view reads (`SELECT * FROM other.dbo.t`, `dbA.sys.tables`) ship. **Four-part `linkedserver.db.schema.t` names** surface as Msg 208 instead of real SQL Server's Msg 7202 (no linked-server model). See [`schemas.md`](docs/claude/schemas.md).
-**`ALTER DATABASE … SET` / `COLLATE` surface** — see [`database-options.md`](docs/claude/database-options.md). Most options parse-and-discard; `COMPATIBILITY_LEVEL`, `ALLOW_SNAPSHOT_ISOLATION`, `READ_COMMITTED_SNAPSHOT` are load-bearing.
@@ -191,7 +192,7 @@ Per-feature deep-dives live under `docs/claude/`. Each entry below is a trigger:
191
192
-**`CREATE SCHEMA <schema_element>` greedy form** — simulator dispatches trailing CREATE/GRANT as their own statements rather than as part of the same CREATE SCHEMA. Same end state for the common idiom; mismatched-grammar trailers raise.
192
193
-**`CREATE SCHEMA sys` / `INFORMATION_SCHEMA`** — Msg 2760, matching real SQL Server. The schemas exist as catalog-view hosts.
-**Programmable-object top-level gaps**: CLR functions, logon triggers, INSTEAD OF UPDATE/DELETE on non-updatable views, JOIN-view single-base UPDATE/DELETE, OUTPUT through views, multi-source alias-form UPDATE/DELETE through views (Msg 4405). **Natively-compiled procedures** ship at parser-fidelity tier (`WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS …` + `BEGIN ATOMIC` dispatch the body; ATOMIC's transaction boundary falls through to session isolation). See [`programmable.md`](docs/claude/programmable.md).
195
+
-**Programmable-object top-level gaps**: CLR functions, logon triggers, INSTEAD OF UPDATE/DELETE on non-updatable views, JOIN-view single-base UPDATE/DELETE, OUTPUT through views, multi-source alias-form UPDATE/DELETE through views (Msg 4405). **Natively-compiled procedures**and **CLR procedures** (`CREATE PROCEDURE … AS EXTERNAL NAME …`) ship at parser-fidelity tier (`WITH NATIVE_COMPILATION, SCHEMABINDING, EXECUTE AS …` + `BEGIN ATOMIC` dispatch the natively-compiled body; ATOMIC's transaction boundary falls through to session isolation. CLR-procedure bodies parse silently and `EXEC` is a no-op). See [`programmable.md`](docs/claude/programmable.md).
195
196
-**PRINT semantic gaps** — Msg 1046 subquery-in-operand not raised; non-string formatting uses `CoerceTo(varchar(8000))` instead of PRINT-specific style 0; 8000/4000-byte truncation not enforced. `InfoMessage` event surface itself ships (see `SimulatedDbConnection.InfoMessage`); these are the residual fidelity gaps in what each entry carries.
196
197
-**`ALTER TABLE` out-of-scope**: DROP PERIOD FOR SYSTEM_TIME, REBUILD, SWITCH PARTITION, `ALTER COLUMN ADD/DROP {PERSISTED|MASKED|ROWGUIDCOL|SPARSE}`, identity → non-integer type change, multi-constraint ADD in one statement. Modeled shapes in [`alter-table.md`](docs/claude/alter-table.md).
197
198
-**`hierarchyid` / `geography` / `geometry` byte-identical CAST encoding** — currently simulator-native; cross-engine byte transfer deferred. See [`hierarchyid.md`](docs/claude/hierarchyid.md), [`spatial.md`](docs/claude/spatial.md).
@@ -203,10 +204,9 @@ Per-feature deep-dives live under `docs/claude/`. Each entry below is a trigger:
203
204
-`APPROX_COUNT_DISTINCT`: implemented as exact `COUNT(DISTINCT)`.
204
205
-`decimal` / `numeric`: backed by .NET `decimal`. Values requiring more than 28 significant digits aren't modeled (declarations up through `decimal(38, *)` accepted so storage byte-width matches).
205
206
-`float` text formatting: .NET `G15`/`G7` rather than SQL Server's `1e+015`-style scientific.
206
-
- Auto-generated PK / UNIQUE / CHECK constraint names: `PK__<table>__<hex>` / `UQ__...` / `CK__<table>__[col__]<hex>`; the 16-hex suffix is a deterministic FNV-1a hash, not SQL Server's object-id-derived hex (stable across runs but won't byte-match).
207
+
- Auto-generated constraint names: PK / UNIQUE shape `PK__<table8>__<16hex>` / `UQ__<table8>__<16hex>` (16-hex 64-bit FNV-1a); CK / FK / DF shape `CK__<table8>__[<col8>__]<8hex>` (8-hex 32-bit FNV-1a). Both are deterministic across runs, distinct from SQL Server's object-id-derived hex (so won't byte-match).
207
208
-**DELETE / UPDATE leak page space**: deleted (or relocated) row payload bytes stay in their original page until process exit; only the slot is tombstoned. Slot directory entries also never reused.
208
209
-**DELETE / UPDATE leak LOB chains**: orphaned LOB chains stay in `Heap.LobPages`. Other rows reference LOB pages by stable index, so list compaction would corrupt them.
209
-
-**Mass-shift UPDATE on a unique key**: `UPDATE t SET k = k + 1` where k is PK/UNIQUE may spuriously raise Msg 2627 — the two-phase validator compares each affected row's new key against other affected rows' new keys, so post-shift values overlapping pre-shift values trigger a false positive.
210
210
-**`GetBytes`/`GetChars` materialize, don't stream**: each call decodes the full column value via `RowDecoder` and slices into the caller's buffer. Behavior matches per-call observation; the streaming-memory guarantee doesn't.
211
211
-**`SELECT INTO` string `+` reads as nullable**: real SQL Server projects `cs + 'x'` (both NOT NULL) as NOT NULL; the simulator can't statically distinguish string-concat from integer-add at projection-schema time (the dispatch happens runtime on operand types), so all `Add` results read as nullable. Conservative; no test reliance on string-`+`-non-null.
212
212
-**`SELECT INTO` from a CTE drops identity + nullability**: CTE bindings synthesize their wrapper `HeapColumn` entries with `nullable: true` and no identity, so the analyzer treats CTE sources as derived plans. Real SQL Server preserves both through simple single-source CTEs. Fix requires propagating column metadata through CTE bindings.
0 commit comments