Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show columns from view error #36426

Closed
shiyuhang0 opened this issue Jul 21, 2022 · 1 comment · Fixed by #36613
Closed

show columns from view error #36426

shiyuhang0 opened this issue Jul 21, 2022 · 1 comment · Fixed by #36613
Assignees
Labels

Comments

@shiyuhang0
Copy link
Member

shiyuhang0 commented Jul 21, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE added (`id` int(11),`name` text,`some_date` timestamp);
CREATE TABLE incremental  (
  `id` int(11),
  `name`text,
  `some_date` timestamp
);
 create view
            temp_view
        as (
select * from `added`
where id > (select max(id) from `incremental`)
        );
 show columns from temp_view;

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

success

3. What did you see instead (Required)

1356 - View 'test.temp_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them

4. What is your TiDB version? (Required)

v6.1.0

5. Other Info

TiDB 6.0.0 and MySQL 8.0.27 will success.

TIDB doc shows that show columns from is fully compatible with MySQL, so I think is a bug for TiDB v6.1.0
https://docs.pingcap.com/tidb/v5.4/sql-statement-show-columns-from#mysql-compatibility

@shiyuhang0 shiyuhang0 added the type/bug The issue is confirmed as a bug. label Jul 21, 2022
@ti-chi-bot ti-chi-bot added may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.0 may-affects-6.2 labels Jul 21, 2022
@hawkingrei hawkingrei self-assigned this Jul 21, 2022
@tangenta tangenta removed may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 labels Jul 25, 2022
@tangenta
Copy link
Contributor

Introduced by #33946.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants