Skip to content

fix : Allow MySQL database creation without selected database#2128

Merged
t8y2 merged 2 commits into
t8y2:mainfrom
Driftlux:codex/allow-create-database-without-selection
Jun 30, 2026
Merged

fix : Allow MySQL database creation without selected database#2128
t8y2 merged 2 commits into
t8y2:mainfrom
Driftlux:codex/allow-create-database-without-selection

Conversation

@Driftlux

Copy link
Copy Markdown
Contributor

Summary

  • Allow MySQL-compatible connections to execute CREATE DATABASE / CREATE SCHEMA without a selected database.
  • Keep the existing selected-database requirement for ordinary MySQL queries.
  • Add focused coverage for the empty-database execution guard.

Root Cause

The query execution guard rejected every non-single-database connection when the active tab had an empty database value. On a fresh MySQL server where DBX only shows system databases and no user database is selectable, this blocks CREATE DATABASE ..., leaving users with no way to create the first database from the query editor.

Validation

  • ./node_modules/.bin/vitest run apps/desktop/src/composables/__tests__/useSqlExecution.spec.ts
  • ./node_modules/.bin/vue-tsc --noEmit --project apps/desktop/tsconfig.json
  • ./node_modules/.bin/oxlint apps/desktop/src/composables/useSqlExecution.ts apps/desktop/src/composables/__tests__/useSqlExecution.spec.ts

@Driftlux Driftlux marked this pull request as ready for review June 30, 2026 02:46
@Driftlux Driftlux changed the title [codex] Allow MySQL database creation without selected database fix : Allow MySQL database creation without selected database Jun 30, 2026
@t8y2 t8y2 merged commit 427d0c5 into t8y2:main Jun 30, 2026
@t8y2

t8y2 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Thanks for the contribution! Merged in 427d0c5, will be released in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants