Skip to content

lightning's internal table does not have PK so can't work with sql_require_primary_key=ON #57479

@lance6716

Description

@lance6716

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

turn on sql_require_primary_key and run lightning

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

no error

3. What did you see instead (Required)

lightning will create some internal tables, and failed with error Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting. This is because these tables have no PK

4. What is your TiDB version? (Required)

all version

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.5This bug affects the 6.5.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/lightningThis issue is related to Lightning of TiDB.severity/moderatetype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions