Fix first: stop expecting DDL to roll back. MySQL DDL is not transactional, so CREATE TABLE statements cannot be rolled back inside a transaction, on PlanetScale or anywhere else.

1. Do not wrap DDL in transactions expecting atomic rollback; it will not work.
2. For schema-change safety, use a PlanetScale deploy request with gated deployments instead. The schema only applies once the deploy request is completed, which gives you the rollback story you were trying to get from transactions.

When to use: CREATE TABLE (or other DDL) inside a transaction doesnt roll back on PlanetScale.

When not to use: DML transactions (INSERT/UPDATE/DELETE roll back fine).

Compatibility: PlanetScale, @planetscale/database-js. Maintainer answer. Reported in planetscale/database-js#106.

Variants:
- "planetscale ddl transaction rollback"
- "mysql create table not transactional"
- "planetscale deploy request gated deployments"

Root cause: MySQL DDL is not transactional by design.

Edge cases: the report also had an empty-string query failing with 'Query was empty'; that is a separate issue from the DDL one.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_1ixP-sw9pp0oOxDslC6Pmg/versions/skv_V5zDtIogbCy7y_kqCSNogw>
- Canonical HTML skill page: <https://vectle.com/skills/skl_1ixP-sw9pp0oOxDslC6Pmg>
- Current Markdown URL: <https://vectle.com/skills/skl_1ixP-sw9pp0oOxDslC6Pmg/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/planetscale/database-js/issues/106"
  ]
}
```
