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

table not exist error code on release-3.0 is not the same as master #16980

Closed
cyliu0 opened this issue May 6, 2020 · 2 comments
Closed

table not exist error code on release-3.0 is not the same as master #16980

cyliu0 opened this issue May 6, 2020 · 2 comments
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/moderate sig/sql-infra SIG: SQL Infra

Comments

@cyliu0
Copy link
Contributor

cyliu0 commented May 6, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

On master the error code is 1146. But It's 1105 on release-3.0

1. What did you do?

mysql root@127.0.0.1:test> create table t (a int)
Query OK, 0 rows affected
Time: 0.006s
mysql root@127.0.0.1:test> create view v1 as select * from t
Query OK, 0 rows affected
Time: 0.005s
mysql root@127.0.0.1:test> create view v2 as select * from v1
Query OK, 0 rows affected
Time: 0.005s

2. What did you expect to see?

On master:

mysql root@127.0.0.1:test> create or replace view v1 as select * from v2
(1146, "Table 'test.v1' doesn't exist")
mysql root@127.0.0.1:test> select tidb_version()
+-------------------------------------------------------------------+
| tidb_version()                                                    |
+-------------------------------------------------------------------+
| Release Version: v4.0.0-beta.2-395-g1c3435b4a                     |
| Git Commit Hash: 1c3435b4a62126de95583a67c3008f143e362851         |
| Git Branch: master                                                |
| UTC Build Time: 2020-05-06 07:18:30                               |
| GoVersion: go1.14.2                                               |
| Race Enabled: false                                               |
| TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 |
| Check Table Before Drop: false                                    |
+-------------------------------------------------------------------+
1 row in set
Time: 0.014s

3. What did you see instead?

On release-3.0:

mysql root@127.0.0.1:test> create or replace view v1 as select * from v2
(1105, "Table 'test.v1' doesn't exist")
mysql root@127.0.0.1:test> select tidb_version()
+-------------------------------------------------------------------+
| tidb_version()                                                    |
+-------------------------------------------------------------------+
| Release Version: v3.0.12-99-g62e831481                            |
| Git Commit Hash: 62e8314819dbccf4ee0db5163cab806672b07324         |
| Git Branch: HEAD                                                  |
| UTC Build Time: 2020-05-06 06:47:22                               |
| GoVersion: go version go1.14.2 darwin/amd64                       |
| Race Enabled: false                                               |
| TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306 |
| Check Table Before Drop: false                                    |
+-------------------------------------------------------------------+
1 row in set
Time: 0.015s

4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)

@cyliu0 cyliu0 added the type/bug This issue is a bug. label May 6, 2020
@github-actions github-actions bot added this to Need Triage in Question and Bug Reports May 6, 2020
@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented May 6, 2020

We can add mysql.ErrNoSuchTable: mysql.ErrNoSuchTable, here.

@XuHuaiyu XuHuaiyu added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels May 6, 2020
@XuHuaiyu XuHuaiyu removed their assignment May 6, 2020
@winoros winoros moved this from Need Triage to In Progress: Root Cause Located in Question and Bug Reports May 6, 2020
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Nov 16, 2020
@github-actions github-actions bot added this to Issue Backlog: Need Triage in SIG Infra Kanban Nov 16, 2020
@bb7133
Copy link
Member

bb7133 commented Nov 20, 2020

This is actually expected @cyliu0 :

Some error codes are not correct in 3.0, as you may see and we decided to fix them in the later(4.0+) version. However, the change didn't apply to 3.0 because we want to make the change only in major versions.

@bb7133 bb7133 closed this as completed Nov 20, 2020
Question and Bug Reports automation moved this from Root Cause Located to Closed(Archived Every Week) Nov 20, 2020
@bb7133 bb7133 removed the type/bug This issue is a bug. label Nov 20, 2020
@pingcap pingcap deleted a comment from ti-srebot Nov 20, 2020
@ghost ghost moved this from Issue Backlog: Need Triage to In Documenting in SIG Infra Kanban Dec 3, 2020
@ghost ghost moved this from In Documenting to Done in SIG Infra Kanban Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/moderate sig/sql-infra SIG: SQL Infra
Projects
No open projects
Question and Bug Reports
  
Closed(Archived Every Week)
Development

No branches or pull requests

6 participants