Skip to content

[Bug]: GET_LOCK / RELEASE_LOCK / IS_FREE_LOCK unsupported — blocks Prisma Migrate (v3.0.11 & 4.0-dev) #24728

Closed

Description

@dengn

Summary

The user-level advisory lock functions GET_LOCK / RELEASE_LOCK / IS_FREE_LOCK are not implemented. This blocks Prisma Migrate, which acquires a GET_LOCK advisory lock before applying any migration.

Related: #23036 (closed, "MySQL function not implemented: GET_LOCK") — still reproduces; also likely covered by the batch issue #24486.

Steps to Reproduce

SELECT GET_LOCK('prisma_migrate_lock', 5);
SELECT IS_FREE_LOCK('prisma_migrate_lock');
SELECT RELEASE_LOCK('prisma_migrate_lock');

Actual Behavior

ERROR 20105 (HY000): not supported: function or operator 'get_lock'
ERROR 20105 (HY000): not supported: function or operator 'is_free_lock'
ERROR 20105 (HY000): not supported: function or operator 'get_lock'

Prisma impact

prisma migrate deploy fails immediately:

Error: not supported: function or operator 'get_lock'
   0: schema_core::state::ApplyMigrations

Workaround: set PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK=1. With the flag, migrate deploy succeeds and creates all tables. But the default path is broken and surprising.

Expected Behavior

MySQL implements these named locks (return 1 / 0 / NULL). Implementing them (or accepting them as no-ops) would let Prisma Migrate work out of the box.


Test context — Found while testing Prisma ORM (v5.22) compatibility against MatrixOne. Reproduced on both:

  • Prod cloud — 8.0.30-MatrixOne-v3.0.11
  • 4.0 dev line — nightly-0bfda604 (select version() → 8.0.30-MatrixOne-v)

(Results on the older v3.0.5 are intentionally omitted.)

Activity

  1. added
    kind/bug
    on May 31, 2026
  2. added
    severity/s0
    on Jun 2, 2026
  3. added theissue type on Jun 2, 2026
  4. added this to the MO-202606 milestone on Jun 2, 2026
  5. modified the milestones: MO-202606, MO-202607 on Jun 30, 2026
  6. jiangxinmeng1 commented on Jul 28, 2026

    @jiangxinmeng1
    Contributor

    fixed by #25019

  7. ghost closed this as completedon Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugseverity/s0

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions