fix(mysql): optionally keep explicit transactions in autocommit tabs

This commit is contained in:
zipg authored and GitHub committed 2026-09-22 11:11:06 +08:00
1 parent 74f1704d09
commit dc6fee7e93
35 files changed
+1274 -47

No files matched your search

+5
View File
@@ -1382,6 +1382,10 @@ export async function executeMulti(
useTransaction?: boolean;
continueOnError?: boolean;
executionMode?: "simple";
/** MySQL auto-commit tabs: keep a transaction the user opened explicitly
* (`BEGIN` / `START TRANSACTION`) open across executions until COMMIT /
* ROLLBACK instead of rolling it back when the batch ends. */
preserveExplicitTransaction?: boolean;
},
): Promise<QueryResult[]> {
return postQueryWithDiagnostics(
@@ -1430,6 +1434,7 @@ export async function executeMultiWithProgress(
useTransaction?: boolean;
continueOnError?: boolean;
executionMode?: "simple";
preserveExplicitTransaction?: boolean;
executionId?: string;
},
): Promise<QueryResult[]> {
+5
View File
@@ -1618,6 +1618,10 @@ export async function executeMulti(
useTransaction?: boolean;
continueOnError?: boolean;
executionMode?: "simple";
/** MySQL auto-commit tabs: keep a transaction the user opened explicitly
* (`BEGIN` / `START TRANSACTION`) open across executions until COMMIT /
* ROLLBACK instead of rolling it back when the batch ends. */
preserveExplicitTransaction?: boolean;
},
): Promise<QueryResult[]> {
const diagnosticsEnabled = isDebugLoggingEnabled();
@@ -1684,6 +1688,7 @@ export async function executeMultiWithProgress(
useTransaction?: boolean;
continueOnError?: boolean;
executionMode?: "simple";
preserveExplicitTransaction?: boolean;
executionId?: string;
},
): Promise<QueryResult[]> {
@@ -129,6 +129,7 @@ export const EDITOR_SETTINGS_DRAFT_KEYS = [
"clickTableNavigationTarget",
"completionTriggerMode",
"defaultTransactionMode",
"keepExplicitTransactionInAutoCommit",
] as const satisfies readonly (keyof EditorSettings)[];
export type EditorSettingsDraftKey = (typeof EDITOR_SETTINGS_DRAFT_KEYS)[number];
@@ -75,6 +75,7 @@ const SETTINGS_TRANSFER_CATEGORY_KEYS: Record<SettingsTransferCategoryId, readon
editor: [
"executeMode",
"defaultTransactionMode",
"keepExplicitTransactionInAutoCommit",
"executeAllOnBlankLine",
"showExecutionTargetPicker",
"showStatementRunButtons",