From a6b4663afd72298a092f3b48be39eeffb64cc163 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Fri, 13 Nov 2026 13:04:21 +0700 Subject: [PATCH 1/2] docs(features): Read-Only on older MySQL and MariaDB servers and in an open transaction --- features/safe-mode.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/safe-mode.mdx b/features/safe-mode.mdx index da67ccc..30d1735 100644 --- a/features/safe-mode.mdx +++ b/features/safe-mode.mdx @@ -52,9 +52,9 @@ It does not sit in front of reading metadata. Loading the sidebar, opening a tab A statement runs as a read only when TablePro can tell for certain that it reads. Anything it cannot tell counts as a write: confirmed at the Alert and Safe Mode levels, blocked at Read-Only. -A read can still call a function that writes, such as `SELECT purge_orders()`. At **Read-Only** on PostgreSQL, PGlite, CockroachDB, KingbaseES, MySQL, MariaDB, SQLite, DuckDB and ClickHouse, the server refuses that write. Every read TablePro runs for you there runs in the engine's own read-only mode: Run, Run Selection, Run All, Explain, opening a table or view with its row counts and page turns, Fetch All, exports, Transfer, Data Compare, Copy Objects and dashboard tiles. Run All then opens no transaction of its own, and a SQL export reads table by table with no snapshot across tables. DuckDB and KingbaseES do this once their plugin in **Settings > Extensions** is updated for this release. +A read can still call a function that writes, such as `SELECT purge_orders()`. At **Read-Only** on PostgreSQL, PGlite, CockroachDB, KingbaseES, MySQL 5.6.5 and later, MariaDB 10.0 and later, SQLite, DuckDB and ClickHouse, the server refuses that write. Every read TablePro runs for you there runs in the engine's own read-only mode: Run, Run Selection, Run All, Explain, opening a table or view with its row counts and page turns, Fetch All, exports, Transfer, Data Compare, Copy Objects and dashboard tiles. Run All then opens no transaction of its own, and a SQL export reads table by table with no snapshot across tables. DuckDB and KingbaseES do this once their plugin in **Settings > Extensions** is updated for this release. -Oracle, Dameng and OceanBase have no such mode, and their functions can write. At **Read-Only** there, a query that calls a function outside TablePro's list of built-ins is blocked, and so is a raw filter or the filter of an export, a Transfer, a Data Compare or a Copy Objects, before any row is read. The message names the level to switch to: **Alert**, or the lowest level a [configuration profile](#managed-by-an-organization) or Agent mode still offers, and it says the level is held when nothing below Read-Only is offered. Below Read-Only the query counts as a read, so only the two Full levels ask before it runs. The automatic row count of such a browse shows no total. A function called without parentheses, which Oracle and Dameng allow, looks like a column and is not blocked. +Oracle, Dameng, OceanBase, MySQL before 5.6.5 and MariaDB before 10.0 have no such mode, and their functions can write. At **Read-Only** there, a query that calls a function outside TablePro's list of built-ins is blocked, and so is a raw filter or the filter of an export, a Transfer, a Data Compare or a Copy Objects, before any row is read. The message names the level to switch to: **Alert**, or the lowest level a [configuration profile](#managed-by-an-organization) or Agent mode still offers, and it says the level is held when nothing below Read-Only is offered. Below Read-Only the query counts as a read, so only the two Full levels ask before it runs. The automatic row count of such a browse shows no total. A function called without parentheses, which Oracle and Dameng allow, looks like a column and is not blocked. `EXPLAIN` and `DESCRIBE` are reads until an option runs the statement. With `ANALYZE` they count as the statement they explain, so `EXPLAIN ANALYZE` of a `SELECT` is a read and of a `DELETE` is a write. An option TablePro does not recognize, or one in quotes, counts as running the statement, and an `EXPLAIN` whose statement cannot be found counts as a write. `ANALYZE` of a table stores statistics and is a write. @@ -100,7 +100,7 @@ SHOW SESSION VARIABLES WHERE Variable_name IN `innodb_read_only` set to `ON` means you are on a replica. Connect to the primary to write. -Running in the engine's read-only mode changes a few things at **Read-Only**. PostgreSQL and MySQL refuse `SELECT ... FOR UPDATE` and `FOR SHARE`, and add a begin and a rollback round trip to each statement. A `SET` or `set_config` that a function runs is undone after the statement. While the session holds an open transaction, a read is refused until you roll it back; SQLite reads inside the transaction instead. +Running in the engine's read-only mode changes a few things at **Read-Only**. PostgreSQL and MySQL refuse `SELECT ... FOR UPDATE` and `FOR SHARE`, and add a begin and a rollback round trip to each statement. On PostgreSQL, a `SET` or `set_config` that a function runs is undone after the statement. While the session holds an open transaction or a table lock, as a MySQL or MariaDB session with autocommit off always does, a read on PostgreSQL, MySQL or MariaDB runs inside it without the read-only mode, and a query that calls a function outside the built-ins is blocked there as on Oracle. SQLite reads inside the transaction too. ## Execution log From d8080e2a91b3691b017373e14316fc3dffc2c8b8 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Fri, 13 Nov 2026 16:41:44 +0700 Subject: [PATCH 2/2] docs(features): word the autocommit-off case exactly --- features/safe-mode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/safe-mode.mdx b/features/safe-mode.mdx index 4c7cb4e..c1e1584 100644 --- a/features/safe-mode.mdx +++ b/features/safe-mode.mdx @@ -104,7 +104,7 @@ SHOW SESSION VARIABLES WHERE Variable_name IN `innodb_read_only` set to `ON` means you are on a replica. Connect to the primary to write. -Running in the engine's read-only mode changes a few things at **Read-Only**. PostgreSQL and MySQL refuse `SELECT ... FOR UPDATE` and `FOR SHARE`, and add a begin and a rollback round trip to each statement. On PostgreSQL, a `SET` or `set_config` that a function runs is undone after the statement. While the session holds an open transaction or a table lock, as a MySQL or MariaDB session with autocommit off always does, a read on PostgreSQL, MySQL or MariaDB runs inside it without the read-only mode, and a query that calls a function outside the built-ins is blocked there as on Oracle. SQLite reads inside the transaction too. +Running in the engine's read-only mode changes a few things at **Read-Only**. PostgreSQL and MySQL refuse `SELECT ... FOR UPDATE` and `FOR SHARE`, and add a begin and a rollback round trip to each statement. On PostgreSQL, a `SET` or `set_config` that a function runs is undone after the statement. While the session holds an open transaction or a table lock, as a MySQL or MariaDB session with autocommit off does after its first statement, a read on PostgreSQL, MySQL or MariaDB runs inside it without the read-only mode, and a query that calls a function outside the built-ins is blocked there as on Oracle. SQLite reads inside the transaction too. ## Execution log