Skip to content

SELECT LOCK IN SHARE MODE is unsafe #19383

@ghost

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

See: https://docs.pingcap.com/tidb/stable/pessimistic-transaction#difference-with-mysql-innodb

Under (2) it says that SELECT LOCK IN SHARE MODE is a noop. This seems unsafe, at least by default.

2. What did you expect to see? (Required)

I would like to see it protected by the feature tidb_enable_noop_functions. This will allow users to explicitly turn it on, if they require syntax support but are fine with a noop.

3. What did you see instead (Required)

The statement executes without errors.

4. What is your TiDB version? (Required)

All versions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions