René's URL Explorer Experiment


Title: Managed MySQL deploys send a migration without breakpoints as one multi-statement query, which Hyperdrive does not support · Issue #414 · voidzero-dev/void · GitHub

Open Graph Title: Managed MySQL deploys send a migration without breakpoints as one multi-statement query, which Hyperdrive does not support · Issue #414 · voidzero-dev/void

X Title: Managed MySQL deploys send a migration without breakpoints as one multi-statement query, which Hyperdrive does not support · Issue #414 · voidzero-dev/void

Description: Problem A MySQL app deploys to the Void platform with void deploy. The platform applies pending migrations through the app Worker's migration handler. That handler reaches MySQL through Hyperdrive. A migration file can have several state...

Open Graph Description: Problem A MySQL app deploys to the Void platform with void deploy. The platform applies pending migrations through the app Worker's migration handler. That handler reaches MySQL through Hyperdrive....

X Description: Problem A MySQL app deploys to the Void platform with void deploy. The platform applies pending migrations through the app Worker's migration handler. That handler reaches MySQL through Hyperdr...

Opengraph URL: https://github.com/voidzero-dev/void/issues/414

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Managed MySQL deploys send a migration without breakpoints as one multi-statement query, which Hyperdrive does not support","articleBody":"## Problem\n\nA MySQL app deploys to the Void platform with `void deploy`. The platform applies pending migrations through the app Worker's migration handler. That handler reaches MySQL through Hyperdrive.\n\nA migration file can have several statements and no `--> statement-breakpoint` lines. A hand-written file is the usual case; `void db generate` adds the lines. The handler sends such a file as one query, on a connection opened with `multipleStatements: true`.\n\nCloudflare's Hyperdrive docs list \"Multi-statement queries\" as an unsupported MySQL feature. So this file will probably fail on a real Hyperdrive, and the deploy stops. **We have not run this against a real Hyperdrive.** Miniflare's local Hyperdrive is a plain TCP proxy, so local runs pass.\n\n| Path | Connects through | File with several statements and no breakpoints |\n| --- | --- | --- |\n| `void db migrate`, `void deploy --platform cloudflare` | `DATABASE_URL`, direct | sent as one query; MySQL accepts it |\n| `void deploy` (Void platform) | Hyperdrive | sent as one query; unsupported per Cloudflare docs |\n\nTwo related gaps for the same files:\n\n1. **No partial-apply note.** When a file fails partway, `void db migrate` adds a note: \"MySQL commits schema changes immediately, so earlier statements in `\u003cfile>` may already be applied...\". The note shows only when at least one statement finished. A file without breakpoints is one query, so the count stays 0 and the note never shows, even when its first `CREATE TABLE` was committed. On MySQL 8.4:\n\n   ```\n   ■ migration 0002_comments.sql failed: Key column 'nope' doesn't exist in table\n   ```\n\n   The table `comments` now exists, but the file is not recorded. The next run fails with `Table 'comments' already exists`. The same SQL with a breakpoint line shows the note.\n\n2. **Sharded Vitess.** Each file runs between `BEGIN` and `COMMIT`. On a sharded Vitess keyspace (for example PlanetScale MySQL), the default transaction mode is `MULTI`. A commit that fails on one shard does not roll back the shards that already committed (Vitess docs, shard isolation and atomicity). So a data-only file that writes to several shards can partly apply. `docs/guide/database/mysql.md:58` says \"a failed file that only changes data leaves the database unchanged\". Not run on a sharded keyspace.\n\n## Repro\n\nHyperdrive (not confirmed live):\n\n1. In a MySQL app, add `db/migrations/0002_two.sql` (and its journal entry) with no breakpoint line:\n   ```sql\n   CREATE TABLE comments (id int primary key);\n   CREATE TABLE tags (id int primary key);\n   ```\n2. Run `void deploy` to the Void platform.\n3. Per Cloudflare's docs, Hyperdrive rejects the multi-statement query and the migration fails.\n\nMissing note (seen on MySQL 8.4):\n\n1. Add `0002_comments.sql` with no breakpoint line:\n   ```sql\n   CREATE TABLE comments (id int primary key);\n   ALTER TABLE counters ADD CONSTRAINT bad FOREIGN KEY (nope) REFERENCES comments(id);\n   ```\n2. Run `void db migrate`. The error has no note, and `comments` exists.\n3. Run it again: `Table 'comments' already exists`.\n\n## Cause\n\n- `packages/void/src/runtime/migration-handler-mysql.ts:53-57` opens the Hyperdrive connection with `multipleStatements: true`; `:88-91` sends each piece from `splitMigrationSql`. On main: `:51-54` and `:71-73`.\n- `packages/void/src/runtime/migration-handler.ts:714-720`: `splitMigrationSql` returns the whole file as one piece when it has no breakpoint line.\n- `packages/void/src/migrations/runner-mysql.ts:148-167`: `ran` counts finished queries, and the note needs `ran > 0` (`:163-164`, message at `:115-126`).\n\n## Suggested fix\n\n- For MySQL, reject a file with several statements and no breakpoint lines when Void plans migrations, with a clear message (\"add `--> statement-breakpoint` after each statement\"). Then drop `multipleStatements` from the Hyperdrive connection. A SQL-aware splitter is the other option, but it must respect strings, comments and `BEGIN ... END` bodies.\n- Show the note for a failed file without breakpoints when the file has more than one statement and the transaction is no longer open.\n- Docs: say that on sharded Vitess a file that writes to several shards is not atomic.\n- Check the behavior once against a real Hyperdrive.\n\n## Evidence\n\n- Code read at origin/main and at the head of #413.\n- Cloudflare docs, Hyperdrive \"Supported databases and features\", \"Unsupported MySQL features\": \"Multi-statement queries\".\n- `void db migrate` on MySQL 8.4 with the head of #413: the output above, then `Table 'comments' already exists` on rerun.\n- Vitess docs on shard isolation and atomicity (default `MULTI` mode).\n- #413 does not change the multi-statement send. It adds the per-file transaction and the note, and the note does not cover these files. On main there is no note at all.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nhttps://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH\n","author":{"url":"https://github.com/Brooooooklyn","@type":"Person","name":"Brooooooklyn"},"datePublished":"2026-10-14T04:05:23Z","url":"https://github.com/voidzero-dev/void/issues/414"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:defdc14a-c9ee-4379-ea5e-3464ac0ce45f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC380:26F963:C1C1A:1089E7:6AFB96EB
html-safe-nonceac3e4d109cd43acc2ab4545cecbec4f1a8b778e3dd300686399b96710e611663
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzgwOjI2Rjk2MzpDMUMxQToxMDg5RTc6NkFGQjk2RUIiLCJ2aXNpdG9yX2lkIjoiODUxOTYxNjk2ODMxNzk2NjA1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3c76a6bac6061b6fcfa85df7ee878f0be6c21b7253b9514499723d0dff50eace
hovercard-subject-tagissue:5841737381
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/414/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8cf75872179add31f259771204aff1691309059f5e01ecfdb1db76b844946a09/voidzero-dev/void/issues/414
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8cf75872179add31f259771204aff1691309059f5e01ecfdb1db76b844946a09/voidzero-dev/void/issues/414
og:image:altProblem A MySQL app deploys to the Void platform with void deploy. The platform applies pending migrations through the app Worker's migration handler. That handler reaches MySQL through Hyperdrive....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBrooooooklyn
hostnamegithub.com
expected-hostnamegithub.com
None4f01efe06174a5ba6342fd58e42d02295e0675bedbb465d6bef2dbaec8e46556
turbo-cache-controlno-preview
go-importgithub.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git
octolytics-dimension-user_id149750581
octolytics-dimension-user_loginvoidzero-dev
octolytics-dimension-repository_id1164437080
octolytics-dimension-repository_nwovoidzero-dev/void
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1164437080
octolytics-dimension-repository_network_root_nwovoidzero-dev/void
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea52db8866b6543b4e83730cd6a6b1360f1a9e4dc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/414#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F414
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F414
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=voidzero-dev%2Fvoid
Reloadhttps://github.com/voidzero-dev/void/issues/414
Reloadhttps://github.com/voidzero-dev/void/issues/414
Reloadhttps://github.com/voidzero-dev/void/issues/414
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues31 (31)https://github.com/voidzero-dev/void/issues
Pull requests16 (16)https://github.com/voidzero-dev/void/pulls
Discussionshttps://github.com/voidzero-dev/void/discussions
Actionshttps://github.com/voidzero-dev/void/actions
Security and qualityhttps://github.com/voidzero-dev/void/security
Insightshttps://github.com/voidzero-dev/void/pulse
https://github.com/voidzero-dev/void
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/414
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/414
#413https://github.com/voidzero-dev/void/pull/413
Managed MySQL deploys send a migration without breakpoints as one multi-statement query, which Hyperdrive does not supporthttps://github.com/voidzero-dev/void/issues/414#top
#413https://github.com/voidzero-dev/void/pull/413
bugSomething isn't workinghttps://github.com/voidzero-dev/void/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/Brooooooklyn
Brooooooklynhttps://github.com/Brooooooklyn
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/414#issue-5841737381
fix(void): make PostgreSQL and MySQL void/db work across frameworks, builds and deploys #413https://github.com/voidzero-dev/void/pull/413
fix(void): make PostgreSQL and MySQL void/db work across frameworks, builds and deploys #413https://github.com/voidzero-dev/void/pull/413
fix(void): make PostgreSQL and MySQL void/db work across frameworks, builds and deploys #413https://github.com/voidzero-dev/void/pull/413
Claude Codehttps://claude.com/claude-code
https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufHhttps://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH
Brooooooklynhttps://github.com/Brooooooklyn
bugSomething isn't workinghttps://github.com/voidzero-dev/void/issues?q=state%3Aopen%20label%3A%22bug%22
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/414#event-33193181962
Brooooooklynhttps://github.com/Brooooooklyn
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/414#event-33206287674
fix(void): split MySQL migration files and hold the migration lock th…https://github.com/voidzero-dev/void/commit/8d66ca986b0c7b98d939b59ea516dfd8b3aa9fef
https://docs.github.com/articles/closing-issues-via-commit-messages
8d66ca9https://github.com/voidzero-dev/void/commit/8d66ca986b0c7b98d939b59ea516dfd8b3aa9fef
fix(void): split MySQL migration files and hold the migration lock th…https://github.com/voidzero-dev/void/commit/84c814058b83a33ae87a71b68c5562c5bab854d9
https://docs.github.com/articles/closing-issues-via-commit-messages
84c8140https://github.com/voidzero-dev/void/commit/84c814058b83a33ae87a71b68c5562c5bab854d9
Brooooooklynhttps://github.com/Brooooooklyn
completedhttps://github.com/voidzero-dev/void/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
b58300fhttps://github.com/voidzero-dev/void/commit/b58300ff84cfdd29ae66557640903613435e872f
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/414#event-33218437032
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/414
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/414
bugSomething isn't workinghttps://github.com/voidzero-dev/void/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.