# OurSQL 2.9.0 — JOINs, concepts and editing fixes

## Where to find the changes

| Change | Location | Behavior |
| --- | --- | --- |
| FULL JOIN / FULL OUTER JOIN | SQL editor → Go | Compatibility extension for a SELECT joining two named tables/views using ON or USING; preserves duplicates, unmatched rows and NULL semantics. |
| Concept visualization | SQL toolbar → Concept visualization | Separate interactive page with INNER/LEFT/RIGHT/FULL/CROSS joins, input/output rows and logical query-processing steps. Uses isolated demo data. |
| Update notification | Bottom-right notification; Settings → Check for app update | Hides stale and same-release notifications; shows new worker version; allows dismiss; restores retry after canceled confirmation. |
| Middle-of-line editing | SQL editor | Stops app textarea styles from altering CodeMirror's hidden input, forces Insert key to retain insertion mode, refreshes measurements after mount, suppresses automatic completion inside an existing word. |
| Compatibility audit | `tests/w3schools-advanced.mjs` | Original semantic fixtures based on W3Schools MySQL tutorial topics and function names, plus selected advanced MariaDB features. |

## FULL JOIN example

```sql
SELECT p.id, p.name, t.title
FROM concept_people AS p
FULL OUTER JOIN concept_teams AS t
    ON p.team = t.id
ORDER BY p.id;
```

The Concept visualization page includes the matching demo schema. The original editor text is retained in history/results/export. A result note identifies compatibility execution. The native MariaDB engine does not provide FULL JOIN; OurSQL compiles this SELECT into a derived UNION ALL relation plus an anti-match, then applies the original projection, filtering, grouping, ordering and limit. It does not retry failed writes.

Supported: named tables/views, schema-qualified table names, aliases, ON predicates (including null-safe equality), USING lists, qualified columns, unambiguous bare columns, stars, DISTINCT, aggregates, WHERE/GROUP BY/HAVING/ORDER BY/LIMIT. With ON and `SELECT *`, duplicate right-hand output names are exposed as `alias.column` so result objects do not discard those values. Use explicit `AS` names for expressions or colliding output labels.

Conservative limits: one standalone SELECT and one full join. Chained/nested full joins, subqueries in that statement, set operations around it, bound `?` placeholders, nondeterministic RAND/UUID/SLEEP/BENCHMARK, DDL wrappers such as CREATE VIEW/INSERT SELECT, and FOR UPDATE/INTO are rejected with guidance. Use native LEFT JOIN + UNION ALL + NOT EXISTS for complex cases. Fully qualified tables should have aliases; use `alias.column` in expressions. This extension is in SQL editor/script execution and validation, not native PREPARE text or the SQL dump importer.

## Compatibility audit scope

Tests run against the exact shipped MariaDB WASM runtime in Node worker threads. They use disposable in-memory databases; user data is never tested or changed.

| Group | Cases | What is checked |
| --- | ---: | --- |
| W3Schools MySQL tutorial | 42 | SELECT/DISTINCT/filters/sort/limit, joins/self-joins, union, aggregate/group/having, subqueries ANY/ALL/EXISTS, DML, DDL, constraints, indexes, views, prepared statements and safe bound values. |
| W3Schools function reference | 138 | Each listed string/numeric/date/advanced function name has an original fixture checking a known value or appropriate invariant. |
| Advanced MariaDB | 23 | Recursive/nonrecursive CTEs, window functions, derived/correlated queries, JSON/JSON_TABLE, regex, GROUP_CONCAT/ROLLUP, EXPLAIN, INTERSECT/EXCEPT, transactions/savepoints, upsert/replace, generated columns, triggers. |
| Expected unsupported cases | 3 | Stored procedures, events and SQL Server TOP produce errors rather than being treated as supported workflows. These passing negative tests do not mean the features work. |
| FULL JOIN regression | 21 | Duplicates, null keys, empty inputs, USING, star names, aliases, filtering/grouping/sort/limit, prepare preview and clear rejection of unsupported shapes. |

References: [W3Schools MySQL tutorial](https://www.w3schools.com/mysql/default.asp), [function reference](https://www.w3schools.com/mysql/mysql_ref_functions.asp), [MariaDB JOIN syntax](https://mariadb.com/docs/server/reference/sql-statements/data-manipulation/selecting-data/joins-subqueries/joins/join-syntax).

This is topic/function coverage using original fixtures, not an automated scrape or execution of every published W3Schools example. It cannot certify every query, parameter combination or SQL dialect. Existing `tests/sql-compatibility.mjs` covers imports, constraints, delimiters, formatting and export replay separately. Exact results and SQL are in the JSON files beside each suite.

## Known engine boundaries

Stored routines and scheduled events remain unavailable in this embedded build. Network replication, remote-server connections and real server-user administration require a database server. Browser filesystem operations such as OUTFILE/LOAD DATA INFILE are not general local-file access; use Import/Export. SQL Server TOP/IDENTITY/GO, PostgreSQL-only syntax and SQLite PRAGMA are not MySQL equivalents. A W3Schools general SQL page may describe another database dialect; choose its MySQL variant where applicable.

## Deployment

Upload the complete package to the existing Vercel project, preserving its COOP/COEP and no-cache headers. This ZIP does not deploy automatically. The release label is 2.9.0.

After deployment, an already-running old build must fetch the new service worker. If its existing Update control is stuck, close other OurSQL tabs and perform one hard reload of the same site to load the fixed updater. Keep browser site data intact: it contains the databases. New releases use the save-before-update confirmation. Settings and IndexedDB/localStorage are never cleared by this updater.

## Running checks

Node 22+:

```sh
node tests/w3schools-advanced.mjs
node tests/full-join.mjs
node tests/sql-compatibility.mjs
node tests/app-updates.mjs
python3 tests/package-integrity.py
```

The browser regression suite requires Playwright and Chromium. Run `node tests/browser-regression.cjs`; optionally set `OURSQL_BROWSER_PATH` to an installed Chromium executable. Browser results distinguish UI/service-worker checks from worker/WASM tests. No timing guarantee for a public network is inferred from local runs.

## Verified results for this package

All the following completed successfully on 31 October 2026:

| Suite | Passed checks |
| --- | ---: |
| W3Schools MySQL + advanced audit | 206 |
| FULL JOIN regression | 21 |
| Existing shipped-engine SQL/import/format/export regressions | 42 |
| App updater unit/lifecycle checks | 18 |
| Chromium browser regressions | 13 |
| Workspace/session/locking | 15 |
| Refresh/draft recovery | 6 |
| Editor lazy loading | 4 |
| Formatted code copy | 6 |
| Result exports | 22 |
| Export content visibility | 15 |
| SQL error/suggestion UI | 5 |

Browser checks used a local server with production-style COOP/COEP headers and the shipped engine. They covered actual cursor clicks and keyboard insertion in the middle, spaces/backspace/undo, accidental Insert-key overwrite, mobile input/overflow at 390px, visualization results, first-install notification state, a real service-worker transition advertising a simulated 2.9.1 release, multi-tab blocking, canceled confirmation, activation/reload and preservation of a SQL draft, preference and database rows. The transition changes the worker release/cache while serving this package's app shell; it is not a public Vercel deployment test. No browser runtime errors were observed.

Offline asset integrity and all 28 original Crowfoot file hashes are checked separately. SQL fixtures and per-case machine-readable results are included under tests/. Checks of expected failures are distinguished in the audit report; they do not claim engine support.
