diff --git a/features/safe-mode.mdx b/features/safe-mode.mdx index 364fb3f..5818984 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. On Oracle, `MATCH_RECOGNIZE` runs: inside it `PREV`, `NEXT`, `FIRST`, `LAST`, `CLASSIFIER` and `MATCH_NUMBER` are the clause's own, and outside it they are your functions. +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. On Oracle, `MATCH_RECOGNIZE` runs: inside it `PREV`, `NEXT`, `FIRST`, `LAST`, `CLASSIFIER` and `MATCH_NUMBER` are the clause's own, and outside it they are your functions. Oracle and Dameng also run a function named without parentheses, as in `SELECT purge_orders FROM dual`, when no table the query reads has a column of that name. At **Read-Only** that name is blocked like a call: the database's own catalog says which names the session can call, read again at most once a minute per schema. A name that is a column of a table in the query, or a select-list alias in `ORDER BY`, runs. A dotted name that no table in the query starts, such as `pkg.purge_orders`, is blocked without asking the catalog. When the catalog cannot be read, the query is blocked. @@ -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. 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 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