---
title: "Release 1.2 | SurrealDB"
description: "Bug fixes: Ensure relevant indexes are triggered when using IN in a SELECT query. Ensure the query planner accepts Datetime and Uuid values. Restore cosine…"
url: https://surrealdb.com/releases/1.2
---

# SurrealDB 1.2

[Latest patch: 1.2.2](https://surrealdb.com/releases/1.2#release-1-2-2) [All releases](https://surrealdb.com/releases)

**Patches.** 3 patch releases on the 1.2 line.

**Latest.** 1.2.2, released Mar 7, 2024.

**Stable.** Ready for production, with every patch's notes below.

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

Back to top

[Version 1.2.2](https://surrealdb.com/releases/1.2#release-1-2-2)

[Version 1.2.1](https://surrealdb.com/releases/1.2#release-1-2-1)

[Version 1.2.0](https://surrealdb.com/releases/1.2#release-1-2-0)

[Home](https://surrealdb.com/)

[Releases](https://surrealdb.com/releases)

1.2

Bug fixes: Ensure relevant indexes are triggered when using IN in a SELECT query. Ensure the query planner accepts Datetime and Uuid values. Restore cosine…

[Newer release line available: 1.3 →](https://surrealdb.com/releases/1.3)

Released Mar 7, 2024

## 1.2.2

Bug fixes:

- Ensure relevant indexes are triggered when using IN in a SELECT query.
- Ensure the query planner accepts `Datetime` and `Uuid` values.
- Restore cosine distance on MTree indexes.
- Fix regression in index data serialisation.
- Ensure `rquickjs` builds don't stall on macOS.

Upgrade or install

## Get SurrealDB v1.2.2

Pick how you want to install or upgrade. SurrealDB Studio can update connected instances in place, or choose a platform below to copy a CLI command for v1.2.2.

SurrealDB Cloud

macOS

Linux

Windows

Docker

Already installed

You can upgrade your SurrealDB Cloud instance to v1.2.2 effortlessly through SurrealDB Studio.

1. Open the [SurrealDB Studio](https://studio.surrealdb.com/current/instances)
2. Select your organisation and instance
3. On the dashboard, click on the "Upgrade" button
4. Your instance will be updated and restarted automatically

[Full install guide](https://surrealdb.com/surrealdb/install)

Released Feb 16, 2024

## 1.2.1

Bug fixes:

- Fix an issue with `WHERE` clause on queries resolving record links or graph edges.
- Fix MATH::SQRT_2 not parsing.
- Fix a panic in span rendering.
- Fix CLI output not displaying properly sometimes.

Newer patch available

## Upgrade to 1.2.2

You are viewing the 1.2.1 changelog. A newer patch in this release line is available - we recommend running 1.2.2 for the latest fixes and improvements.

[View 1.2.2 release notes](https://surrealdb.com/releases/1.2#release-1-2-2)

Released Feb 13, 2024

## 1.2.0

Features:

- Bump MSRV to 1.75.
- In-memory index store.
- Show execution time in CLI.
- knn brute force.
- Implement support for remote JSON Web Key Sets.
- Add support for `LIVE SELECT` in the SDK and CLI.
- Add `IF EXISTS` to `REMOVE TABLE` statement.
- Add `READONLY` keyword to `DEFINE FIELD` statement.
- Add alias `-V` and `--version` flags for `surreal version` command.
- Define types for subfields when defining array fields.
- Add `string::semver::compare`, `string::semver::major`, `string::semver::minor`, `string::semver::patch`, `string::semver::inc::major`, `string::semver::inc::minor`, `string::semver::inc::patch`, `string::semver::set::major`, `string::semver::set::minor`, `string::semver::set::patch` methods.

Bug fixes:

- Make record id string parsing never fail early.
- Prevent overflow in `math::power()`.
- Fix error message pointing to wrong character.
- Respect alias for dynamic field queries with type::field.
- Remove min/1000 in `tx:delp`.
- Replace custom JWT parser causing decoding issues.
- Issue with scoring on complex queries.
- Limit recursion depth when parsing nested RELATE statements.
- Fix a bug where a non-empty list parser would parse empty lists.
- Ensure an attempt to set a protected variable returns an error.
- Fix duration addition in timeout causing overflow.
- Panic invoking parameters and functions without a database.
- Fix a bug where the kind parser would eat whitespace.
- Fix WebSocket notification sending format.
- Implement missing errors for missing clauses on DEFINE-statements.
- Ensure advanced `DEFINE PARAM` parameters are computed correctly.
- Ensure path idioms are correct when looping over.
- Fix json failing to parse with trailing whitespace.
- Fix the five second delay in Wasm after initial connection.
- Add context to live query notifications.
- Fix the modulo operator on sql2 and parser1.
- Improve the js-surql value conversion for numbers.
- Implement revision types for client/server communication.
- Fix builtin error pointing to the wrong part.
- Fix a panic when invalid builtin function names are passed to the executor.

Performance improvements:

- Ensure compression is only enabled when response is a certain size.
- In MTree large vector improvement.

### Use JWKS to dynamically configure your token definitions

```surql
-- Specify the namespace and database for the token
USE NS abcum DB app_vitalsense;

-- Set the name of the token
DEFINE TOKEN token_name
  -- Use this token provider for database authorization
  ON DATABASE
  -- Specify the JWKS specification used to verify the token
  TYPE JWKS
  -- Specify the URL where the JWKS object can be found
  VALUE "https://example.com/.well-known/jwks.json"
;
```

### Define a `READONLY` field

```surql
DEFINE FIELD created ON resource VALUE time::now() READONLY;
```

### Define types for subfields when defining array fields

```surql
DEFINE FIELD foo ON bar TYPE array<number>
-- Where <number> is a subfield of the array type.
-- It now defines the number subfield automatically instead of having to run this manually:
DEFINE FIELD foo.* ON bar TYPE number
```

Newer patch available

## Upgrade to 1.2.2

You are viewing the 1.2.0 changelog. A newer patch in this release line is available - we recommend running 1.2.2 for the latest fixes and improvements.

[View 1.2.2 release notes](https://surrealdb.com/releases/1.2#release-1-2-2)

Newer release line

### [1.3](https://surrealdb.com/releases/1.3)

Updated Mar 15, 2024

Older release line

### [1.1](https://surrealdb.com/releases/1.1)

Updated Jan 16, 2024

[All releases](https://surrealdb.com/releases)

GET STARTED

## Start building with SurrealDB. One data layer for AI, from object storage to agent memory.

[Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy) [Learn more](https://surrealdb.com/docs/what-is-surrealdb)

![ISO 27001](https://surrealdb.com/assets/static/iso.BzQy4FFy.svg)

![AICPA SOC 2 Type 2](https://surrealdb.com/assets/static/aicpa-soc.CE_YjqhK.svg)

![Cyber Essentials](https://surrealdb.com/assets/static/cyber-essentials.CtbmbYfL.svg)

![GDPR](https://surrealdb.com/assets/static/gdpr.IadR7loS.svg)

![Cyber Essentials Plus](https://surrealdb.com/assets/static/cyber-essentials-plus.Cl5P05xe.svg)

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"Releases","item":"https://surrealdb.com/releases"},{"@type":"ListItem","position":3,"name":"1.2","item":"https://surrealdb.com/releases/1.2"}]}
```

```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"SurrealDB 1.2 release notes","description":"Bug fixes: Ensure relevant indexes are triggered when using IN in a SELECT query. Ensure the query planner accepts Datetime and Uuid values. Restore cosine…","datePublished":"2024-03-07T00:00:00.000Z","dateModified":"2024-03-07T00:00:00.000Z","url":"https://surrealdb.com/releases/1.2","mainEntityOfPage":{"@type":"WebPage","@id":"https://surrealdb.com/releases/1.2"},"author":{"@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com"},"publisher":{"@type":"Organization","name":"SurrealDB","logo":{"@type":"ImageObject","url":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg"}},"about":{"@type":"SoftwareApplication","name":"SurrealDB","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, macOS, Windows","softwareVersion":"1.2"}}
```

```json
{"@context":"https://schema.org","@type":"Organization","@id":"https://surrealdb.com/#organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the context and memory layer for AI agents. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```
