tpaw Docs

Mutation Mode

tpaw shows a confirmation dialog before executing INSERT, UPDATE, DELETE, ALTER, DROP, and TRUNCATE statements to prevent accidental data loss.

Mutation mode is tpaw's safeguard against accidental destructive queries. When you execute an INSERT, UPDATE, DELETE, ALTER, DROP, or TRUNCATE statement, tpaw pauses and shows a confirmation dialog before running it. You must explicitly confirm to proceed.

How it works

When you press Cmd+Enter or Cmd+Shift+Enter and the query contains a mutation statement, tpaw:

  1. Detects the mutation keyword (INSERT, UPDATE, DELETE, ALTER, DROP, TRUNCATE)
  2. Pauses execution
  3. Displays the confirmation dialog with the full SQL
  4. Waits for your explicit confirmation

The query does not run until you click Confirm or press Cmd+Enter in the dialog.

The confirmation dialog

The dialog shows:

  • A warning icon and "Confirm Query Execution" heading
  • A warning: "This query will modify data. Review the SQL below before executing."
  • The complete SQL that will be executed
  • Cancel button — dismisses the dialog, SQL is not executed
  • Execute button — proceeds with execution

Keyboard shortcuts in the dialog

KeyAction
Cmd+EnterConfirm and execute
EscapeCancel, dismiss dialog

When mutation mode activates

Mutation mode activates for any statement containing:

  • INSERT INTO ...
  • UPDATE ... SET ...
  • DELETE FROM ...
  • ALTER TABLE/INDEX/SCHEMA/...
  • DROP TABLE/INDEX/SCHEMA/...
  • TRUNCATE ...

Read-only statements (SELECT, EXPLAIN, SHOW) bypass the confirmation dialog.

Disabling mutation mode

Mutation mode cannot be disabled globally — it's a safety feature. If you find yourself confirming the same query repeatedly (e.g., during development), use the Saved Queries feature to store it and execute it directly.

For read-only production connections, enable Safe Mode (the Read-only checkbox) on the connection — this prevents all mutations at the connection level and removes the editing lock in the Data Grid.

Multi-statement execution and mutations

When running all statements with Cmd+Shift+Enter, tpaw shows the confirmation dialog once for the first mutation statement encountered. Confirming allows all mutation statements in that execution batch to proceed.

On this page