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

bug: Executing count(distinct) SQL statements causes service crashes #1962

Open
3 tasks done
TomeC opened this issue Aug 18, 2023 · 0 comments
Open
3 tasks done

bug: Executing count(distinct) SQL statements causes service crashes #1962

TomeC opened this issue Aug 18, 2023 · 0 comments
Labels
A-bug Something isn't working

Comments

@TomeC
Copy link
Contributor

TomeC commented Aug 18, 2023

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

mysql> SELECT "count(distinct 17)_test1", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs1;
ERROR 2013 (HY000): Lost connection to MySQL server during query

service crashed

Expected behavior

The service runs normally and returns the correct result

How To Reproduce

USE test;
CREATE TABLE cs1 (d1 DECIMAL(17), d2 DECIMAL(17,10), d3 DECIMAL(17,16), d4 DECIMAL(17),d5 DECIMAL(17),i1 INT) ;
INSERT INTO cs1 VALUES
    (1234,5678,-0.123456789012345,2,1,1),     
    (1234,-5678,0.12345678901234,2,1,1),
    (1234567890123,123456.90123,0.12345678901234,2,1,1),
    (NULL,NULL,NULL,2,1,1),
    (0,0,0,2,1,1),
    (1234,5678,0.123456789,3,2,2),
    (-12345678923,-5678,0.1234567890121,3,2,2),
    (56789012,123856.90,0.12345678909,3,2,2),
    (NULL,NULL,NULL,3,2,2),
    (0,0,0,3,2,2),
    (1234,5678,-0.123456789012345,1111111111,1,1),
    (1234,5678,-0.123456789012345,1111111111,1,1),
    (1234,5678,-0.123456789012345,1111111112,1,1); 

mysql> SELECT "count(distinct 17)_test1", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs1

ERROR 2013 (HY000): Lost connection to MySQL server during query

Environment

centos7
branch stonedb-5.7-dev

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!
@TomeC TomeC added the A-bug Something isn't working label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant