Skip to content

[Bug] Show view stmt report error when view references invalid table #5918

@xy720

Description

@xy720

Describe the bug
Show view stmt report error when view references invalid table.

To Reproduce
Steps to reproduce the behavior:

1、create two tables.

CREATE TABLE `test1` (
  `a` int(11) NOT NULL COMMENT "",
  `b` int(11) NOT NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(`a`)
DISTRIBUTED BY HASH(`a`) BUCKETS 8
CREATE TABLE `test2` (
  `c` int(11) NOT NULL COMMENT "",
  `d` int(11) NOT NULL COMMENT ""
) ENGINE=OLAP
UNIQUE KEY(`c`)
DISTRIBUTED BY HASH(`c`) BUCKETS 8

2、create view reference table test1.

create view v_test1 as select a, b from test1 limit 1;

3、drop table test1.

drop table test1;

4、show view from test2.

show view from test2;

Expected behavior
Get the result of show view

Screenshots
Error report: unknown table test1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions