Skip to content

query INFORMATION_SCHEMA.TIKV_REGION_STATUS return invalid memory address or nil pointer dereference #52013

@aytrack

Description

@aytrack

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. tiup playground v8.0.0
  2. execute the sql
CREATE TABLE employees ( id INT NOT NULL, fname VARCHAR(30), lname VARCHAR(30), hired DATE NOT NULL DEFAULT '1970-01-01', separated DATE DEFAULT '9999-12-31', job_code INT, store_id INT NOT NULL ) PARTITION BY RANGE (store_id) ( PARTITION p0 VALUES LESS THAN (6), PARTITION p1 VALUES LESS THAN (11), PARTITION p2 VALUES LESS THAN (16), PARTITION p3 VALUES LESS THAN (21) );
select TIDB_TABLE_ID from INFORMATION_SCHEMA.tables where table_name = 'employees' and table_schema = 'test';
select TABLE_ID from INFORMATION_SCHEMA.TIKV_REGION_STATUS where table_id=xxx;

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

query success

3. What did you see instead (Required)

introduced by #48276

[10:47:36]TiDB root:test> select TABLE_ID from INFORMATION_SCHEMA.TIKV_REGION_STATUS where table_id=104;
(1105, 'runtime error: invalid memory address or nil pointer dereference')

4. What is your TiDB version? (Required)

v7.6.0, v8.0.0

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