Bug #96735 | Select doesn't return results from indexed table running on ndbcluster engine | ||
---|---|---|---|
Submitted: | 4 Sep 2019 6:50 | Modified: | 6 Sep 2019 12:53 |
Reporter: | Piotr Maślany | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S2 (Serious) |
Version: | 8.0.17 | OS: | CentOS |
Assigned to: | CPU Architecture: | x86 | |
Tags: | regression |
[4 Sep 2019 6:50]
Piotr Maślany
[4 Sep 2019 8:06]
MySQL Verification Team
Hello Piotr Maślany, Thank you for the report and test case. Verified as described. regards, Umesh
[6 Sep 2019 12:53]
Piotr Maślany
There is the same issue if we specify a payload column to be varchar with proper length. Seems to me like there is some limit on a database row size, if it exceeds about 1024 then query fails. See working example: drop table ndbcluster_test; create table ndbcluster_test( id bigint not null auto_increment, cpr varchar(500) not null, payload varchar(500), payload_hash varchar(18) default NULL, primary key (id) ) ENGINE=ndbcluster; insert into ndbcluster_test (cpr, payload, payload_hash) VALUES ('1234567890', 'ala', 'sfsdf'); insert into ndbcluster_test (cpr, payload, payload_hash) VALUES ('1234567890', 'adff', 'sfsdf'); insert into ndbcluster_test (cpr, payload, payload_hash) VALUES ('1234567890', null, null); insert into ndbcluster_test (cpr, payload, payload_hash) VALUES ('9876543210', 'alfdsa', 'sfsdf'); insert into ndbcluster_test (cpr, payload, payload_hash) VALUES ('9876543210', 'sfala', 'sfsdf'); insert into ndbcluster_test (cpr, payload, payload_hash) VALUES ('9876543210', null, null); -- Now create an index on cpr column: create index ndbcluster_test_idx on ndbcluster_test(cpr); -- Query returns a results (1 row) select * from ndbcluster_test where cpr='1234567890' and payload_hash is not null order by id desc limit 1; And now if we change one of varchar columns and append a size by 1 the query doesn't return results: create table ndbcluster_test( id bigint not null auto_increment, cpr varchar(501) not null, payload varchar(500), payload_hash varchar(18) default NULL, primary key (id) ) ENGINE=ndbcluster;
[18 Sep 2019 12:53]
Mariusz Kolodziej
Same issue exist on on Redhat Enterprise Linux Server 7.7. (Maipo)
[28 Oct 2019 12:38]
Mariusz Kolodziej
Issue resolved in MySQL Cluster 8.0.18