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

TiDB doesn't handle sort by NULL correctly #10478

Closed
winoros opened this issue May 15, 2019 · 1 comment · Fixed by #10488
Closed

TiDB doesn't handle sort by NULL correctly #10478

winoros opened this issue May 15, 2019 · 1 comment · Fixed by #10488
Assignees
Labels
type/bug The issue is confirmed as a bug.

Comments

@winoros
Copy link
Member

winoros commented May 15, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
drop table if exists sort_null_bug;
create table sort_null_bug(a int);
insert into sort_null_bug values(1), (2), (3), (6), (4);
select * from (select *, null as b from sort_null_bug) t order by b;
select * from (select *, null as b from sort_null_bug) t order by b, a;
  1. What did you expect to see?

The two SELECT statements executes successfully.

  1. What did you see instead?

The second one panicked.

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

master 373317f

@winoros winoros self-assigned this May 15, 2019
@winoros
Copy link
Member Author

winoros commented May 15, 2019

This is the root cause of #10456

@winoros winoros added the type/bug The issue is confirmed as a bug. label May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant