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

unexpected unresolved column error when the view refers to dual table #35527

Closed
bajinsheng opened this issue Jun 20, 2022 · 3 comments · Fixed by #35669
Closed

unexpected unresolved column error when the view refers to dual table #35527

bajinsheng opened this issue Jun 20, 2022 · 3 comments · Fixed by #35669
Assignees
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@bajinsheng
Copy link

bajinsheng commented Jun 20, 2022

Bug Report

1. Minimal reproduce step (Required)

CREATE VIEW v0(c0) AS SELECT NULL;
SELECT v0.c0 FROM v0 WHERE (v0.c0 IS NULL) LIKE(NULL); -- ERROR 1105 (HY000) at line 2: Can't find column Column#1 in schema Column: [] Unique key: []

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

No error information.

3. What did you see instead (Required)

ERROR 1105 (HY000) at line 2: Can't find column Column#1 in schema Column: [] Unique key: []

4. What is your TiDB version? (Required)

| Release Version: v6.2.0-alpha-143-gcd731af05
Edition: Community
Git Commit Hash: cd731af
Git Branch: master
UTC Build Time: 2022-06-20 07:36:55
GoVersion: go1.18.3
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Store: unistore |

@bajinsheng bajinsheng added the type/bug The issue is confirmed as a bug. label Jun 20, 2022
@bajinsheng
Copy link
Author

The test case has no error in MySQL 8.0.

@Benjamin2037 Benjamin2037 added the sig/sql-infra SIG: SQL Infra label Jun 22, 2022
@tangenta tangenta self-assigned this Jun 23, 2022
@tangenta
Copy link
Contributor

@bajinsheng Thanks for your reporting.

BTW, how did you find this issue? We would like to see if we can enhance our automated tests.

@bajinsheng
Copy link
Author

Thanks for your reply!
I'm a PhD student in the NUS Test Lab (see https://nus-test.github.io/) and found this and other bugs based on a new technique we are developing to improve SQLancer and other SQL fuzzers.
We are glad to share our technique when it is done.

@winoros winoros changed the title Unexpected Error 1105 unexpected unresolved column error when the view refers to dual table Jun 23, 2022
you06 added a commit to you06/tidb that referenced this issue Jul 1, 2022
Signed-off-by: you06 <you1474600@gmail.com>

fix tests

Signed-off-by: you06 <you1474600@gmail.com>

fix test

Signed-off-by: you06 <you1474600@gmail.com>

update

Signed-off-by: you06 <you1474600@gmail.com>

update bazel

Signed-off-by: you06 <you1474600@gmail.com>

fix test

Signed-off-by: you06 <you1474600@gmail.com>

fix test

Signed-off-by: you06 <you1474600@gmail.com>

update

Signed-off-by: you06 <you1474600@gmail.com>

update client-go

Signed-off-by: you06 <you1474600@gmail.com>

update client-go

Signed-off-by: you06 <you1474600@gmail.com>

update grafana

Signed-off-by: you06 <you1474600@gmail.com>

update bazel

Signed-off-by: you06 <you1474600@gmail.com>

display by stack

Signed-off-by: you06 <you1474600@gmail.com>

set request source for ctx of

Signed-off-by: you06 <you1474600@gmail.com>

address comment

Signed-off-by: you06 <you1474600@gmail.com>

address comment

Signed-off-by: you06 <you1474600@gmail.com>

parser, ddl: support decoding binary literal in set/enum (pingcap#35822)

close pingcap#31338

executor: fix a nil point when @@tidb_enable_collect_execution_info is off and cop cache is on (pingcap#35839)

close pingcap#35829

ddl: support drop columns for multi-schema change (pingcap#35737)

ref pingcap#14766

planner: don't push down predicates over table dual (pingcap#35669)

close pingcap#35527

*: Remove some useless staleness code (pingcap#35849)

close pingcap#35848

ddl: fix potential wrong column definition when setting default value (pingcap#35845)

close pingcap#35846

*: add timeout for test cases (pingcap#35844)

ddl: remove `onDropColumns` and `onAddColumns` (pingcap#35862)

ref pingcap#14766

*: Fix Dockerfile (pingcap#35835)

close pingcap#35828

server: refactor TestConnExecutionTimeout (pingcap#35865)

close pingcap#35868

fix test

Signed-off-by: you06 <you1474600@gmail.com>

fix lint

Signed-off-by: you06 <you1474600@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants