Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.10
    • 10.0.11
    • None
    • None

    Description

      statistics.test fails in valgrind after the push for MDEV-5947.

      Attachments

        Activity

          igor Igor Babaev (Inactive) added a comment - - edited

          The problem can be easily reproduced with the following simple test case:

          CREATE TABLE t1 (
            a int NOT NULL PRIMARY KEY,
            b varchar(32),
            c char(16),
            d date,
            e double,
            f bit(3),
            INDEX idx1 (b, e), 
            INDEX idx2 (c, d),
            INDEX idx3 (d),
            INDEX idx4 (e, b, d)
          ) ENGINE= MYISAM;
           
          INSERT INTO t1 VALUES
            (0, NULL, NULL, NULL, NULL, NULL),
            (7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'dddddddd', '1990-05-15', 0.1, b'100'),
            (17, 'vvvvvvvvvvvvv', 'aaaa', '1989-03-12', 0.01, b'101'),
            (1, 'vvvvvvvvvvvvv', NULL, '1989-03-12', 0.01, b'100'),
            (12, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', '1999-07-23', 0.112, b'001'),
            (23, 'vvvvvvvvvvvvv', 'dddddddd', '1999-07-23', 0.1, b'100'),
            (8, 'vvvvvvvvvvvvv', 'aaaa', '1999-07-23', 0.1, b'100'),
            (22, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'aaaa', '1989-03-12', 0.112, b'001'),
            (31, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'aaaa', '1999-07-23', 0.01, b'001'),
            (10, NULL, 'aaaa', NULL, 0.01, b'010'),
            (5, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', '1999-07-23', 0.1, b'100'),
            (15, 'vvvvvvvvvvvvv', 'ccccccccc', '1990-05-15', 0.1, b'010'),
            (30, NULL, 'bbbbbb', NULL, NULL, b'100'),
            (38, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', NULL, NULL, NULL),
            (18, 'zzzzzzzzzzzzzzzzzz', 'ccccccccc', '1990-05-15', 0.01, b'010'),
            (9, 'yyy', 'bbbbbb', '1998-08-28', 0.01, NULL),
            (29, 'vvvvvvvvvvvvv', 'dddddddd', '1999-07-23', 0.012, b'010'),
            (3, 'yyy', 'dddddddd',  '1990-05-15', 0.112, b'010'),
            (39, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', NULL, 0.01, b'100'),
            (14, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'ccccccccc', '1990-05-15', 0.1, b'100'),
            (40, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', '1989-03-12', NULL, NULL),
            (44, NULL, 'aaaa', '1989-03-12', NULL, b'010'),
            (19, 'vvvvvvvvvvvvv', 'ccccccccc', '1990-05-15', 0.012, b'011'),
            (21, 'zzzzzzzzzzzzzzzzzz', 'dddddddd', '1989-03-12', 0.112, b'100'),
            (45, NULL, NULL, '1989-03-12', NULL, b'011'),
            (2, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'ccccccccc', '1990-05-15', 0.1, b'001'),
            (35, 'yyy', 'aaaa', '1990-05-15', 0.05, b'011'),
            (4, 'vvvvvvvvvvvvv', 'dddddddd', '1999-07-23', 0.01, b'101'),
            (47, NULL, 'aaaa', '1990-05-15', 0.05, b'010'),
            (42, NULL, 'ccccccccc', '1989-03-12', 0.01, b'010'),
            (32, NULL, 'bbbbbb', '1990-05-15', 0.01, b'011'),
            (49, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa', '1990-05-15', NULL, NULL),
            (43, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'bbbbbb', '1990-05-15', NULL, b'100'),
            (37, 'yyy', NULL, '1989-03-12', 0.05, b'011'),
            (41, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'ccccccccc', '1990-05-15', 0.05, NULL),
            (34, 'yyy', NULL, NULL, NULL, NULL),
            (33, 'zzzzzzzzzzzzzzzzzz', 'dddddddd', '1989-03-12', 0.05, b'011'),
            (24,  'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', '1990-05-15', 0.01,  b'101'),
            (11, 'yyy', 'ccccccccc', '1999-07-23', 0.1, NULL),
            (25, 'zzzzzzzzzzzzzzzzzz', 'bbb', '1989-03-12', 0.01,  b'101');
           
          ANALYZE TABLE t1;
           
          SELECT COUNT(DISTINCT t1.e, t1.b, t1.d) FROM t1;
           
          DROP TABLE t1;

          igor Igor Babaev (Inactive) added a comment - - edited The problem can be easily reproduced with the following simple test case: CREATE TABLE t1 ( a int NOT NULL PRIMARY KEY , b varchar (32), c char (16), d date , e double , f bit (3), INDEX idx1 (b, e), INDEX idx2 (c, d), INDEX idx3 (d), INDEX idx4 (e, b, d) ) ENGINE= MYISAM;   INSERT INTO t1 VALUES (0, NULL , NULL , NULL , NULL , NULL ), (7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'dddddddd' , '1990-05-15' , 0.1, b '100' ), (17, 'vvvvvvvvvvvvv' , 'aaaa' , '1989-03-12' , 0.01, b '101' ), (1, 'vvvvvvvvvvvvv' , NULL , '1989-03-12' , 0.01, b '100' ), (12, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'dddddddd' , '1999-07-23' , 0.112, b '001' ), (23, 'vvvvvvvvvvvvv' , 'dddddddd' , '1999-07-23' , 0.1, b '100' ), (8, 'vvvvvvvvvvvvv' , 'aaaa' , '1999-07-23' , 0.1, b '100' ), (22, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'aaaa' , '1989-03-12' , 0.112, b '001' ), (31, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa' , '1999-07-23' , 0.01, b '001' ), (10, NULL , 'aaaa' , NULL , 0.01, b '010' ), (5, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'dddddddd' , '1999-07-23' , 0.1, b '100' ), (15, 'vvvvvvvvvvvvv' , 'ccccccccc' , '1990-05-15' , 0.1, b '010' ), (30, NULL , 'bbbbbb' , NULL , NULL , b '100' ), (38, 'zzzzzzzzzzzzzzzzzz' , 'bbbbbb' , NULL , NULL , NULL ), (18, 'zzzzzzzzzzzzzzzzzz' , 'ccccccccc' , '1990-05-15' , 0.01, b '010' ), (9, 'yyy' , 'bbbbbb' , '1998-08-28' , 0.01, NULL ), (29, 'vvvvvvvvvvvvv' , 'dddddddd' , '1999-07-23' , 0.012, b '010' ), (3, 'yyy' , 'dddddddd' , '1990-05-15' , 0.112, b '010' ), (39, 'zzzzzzzzzzzzzzzzzz' , 'bbbbbb' , NULL , 0.01, b '100' ), (14, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'ccccccccc' , '1990-05-15' , 0.1, b '100' ), (40, 'zzzzzzzzzzzzzzzzzz' , 'bbbbbb' , '1989-03-12' , NULL , NULL ), (44, NULL , 'aaaa' , '1989-03-12' , NULL , b '010' ), (19, 'vvvvvvvvvvvvv' , 'ccccccccc' , '1990-05-15' , 0.012, b '011' ), (21, 'zzzzzzzzzzzzzzzzzz' , 'dddddddd' , '1989-03-12' , 0.112, b '100' ), (45, NULL , NULL , '1989-03-12' , NULL , b '011' ), (2, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'ccccccccc' , '1990-05-15' , 0.1, b '001' ), (35, 'yyy' , 'aaaa' , '1990-05-15' , 0.05, b '011' ), (4, 'vvvvvvvvvvvvv' , 'dddddddd' , '1999-07-23' , 0.01, b '101' ), (47, NULL , 'aaaa' , '1990-05-15' , 0.05, b '010' ), (42, NULL , 'ccccccccc' , '1989-03-12' , 0.01, b '010' ), (32, NULL , 'bbbbbb' , '1990-05-15' , 0.01, b '011' ), (49, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa' , '1990-05-15' , NULL , NULL ), (43, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'bbbbbb' , '1990-05-15' , NULL , b '100' ), (37, 'yyy' , NULL , '1989-03-12' , 0.05, b '011' ), (41, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'ccccccccc' , '1990-05-15' , 0.05, NULL ), (34, 'yyy' , NULL , NULL , NULL , NULL ), (33, 'zzzzzzzzzzzzzzzzzz' , 'dddddddd' , '1989-03-12' , 0.05, b '011' ), (24, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'dddddddd' , '1990-05-15' , 0.01, b '101' ), (11, 'yyy' , 'ccccccccc' , '1999-07-23' , 0.1, NULL ), (25, 'zzzzzzzzzzzzzzzzzz' , 'bbb' , '1989-03-12' , 0.01, b '101' );   ANALYZE TABLE t1;   SELECT COUNT ( DISTINCT t1.e, t1.b, t1.d) FROM t1;   DROP TABLE t1;
          igor Igor Babaev (Inactive) added a comment - - edited

          There is no complains with the following test case:

          CREATE TABLE t2 (
            a int NOT NULL PRIMARY KEY,
            b varchar(32),
            c char(16),
            d int,
            e double,
            f bit(3),
            INDEX idx1 (b, e), 
            INDEX idx2 (c, d),
            INDEX idx3 (d),
            INDEX idx4 (e, b, d)
          ) ENGINE= MYISAM;
           
          INSERT INTO t2 VALUES
            (0, NULL, NULL, NULL, NULL, NULL),
            (7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'dddddddd', 1990, 0.1, b'100'),
            (17, 'vvvvvvvvvvvvv', 'aaaa', 1989, 0.01, b'101'),
            (1, 'vvvvvvvvvvvvv', NULL, 1989, 0.01, b'100'),
            (12, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', 1999, 0.112, b'001'),
            (23, 'vvvvvvvvvvvvv', 'dddddddd', 1999, 0.1, b'100'),
            (8, 'vvvvvvvvvvvvv', 'aaaa', 1999, 0.1, b'100'),
            (22, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'aaaa', 1989, 0.112, b'001'),
            (31, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'aaaa', 1997, 0.01, b'001'),
            (10, NULL, 'aaaa', NULL, 0.01, b'010'),
            (5, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', 1999, 0.1, b'100'),
            (15, 'vvvvvvvvvvvvv', 'ccccccccc', 1990, 0.1, b'010'),
            (30, NULL, 'bbbbbb', NULL, NULL, b'100'),
            (38, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', NULL, NULL, NULL),
            (18, 'zzzzzzzzzzzzzzzzzz', 'ccccccccc', 1990, 0.01, b'010'),
            (9, 'yyy', 'bbbbbb', 1998, 0.01, NULL),
            (29, 'vvvvvvvvvvvvv', 'dddddddd', 1999, 0.012, b'010'),
            (3, 'yyy', 'dddddddd',  1990, 0.112, b'010'),
            (39, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', NULL, 0.01, b'100'),
            (14, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'ccccccccc', 1990, 0.1, b'100'),
            (40, 'zzzzzzzzzzzzzzzzzz', 'bbbbbb', 1989, NULL, NULL),
            (44, NULL, 'aaaa', 1989, NULL, b'010'),
            (19, 'vvvvvvvvvvvvv', 'ccccccccc', 1990, 0.012, b'011'),
            (21, 'zzzzzzzzzzzzzzzzzz', 'dddddddd', 1989, 0.112, b'100'),
            (45, NULL, NULL, 1989, NULL, b'011'),
            (2, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'ccccccccc', 1990, 0.1, b'001'),
            (35, 'yyy', 'aaaa', 1990, 0.05, b'011'),
            (4, 'vvvvvvvvvvvvv', 'dddddddd', 1999, 0.01, b'101'),
            (47, NULL, 'aaaa', 1990, 0.05, b'010'),
            (42, NULL, 'ccccccccc', 1989, 0.01, b'010'),
            (32, NULL, 'bbbbbb', 1990, 0.01, b'011'),
            (49, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa', 1990, NULL, NULL),
            (43, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'bbbbbb', 1990, NULL, b'100'),
            (37, 'yyy', NULL, 1989, 0.05, b'011'),
            (41, 'xxxxxxxxxxxxxxxxxxxxxxxxxx', 'ccccccccc', 1990, 0.05, NULL),
            (34, 'yyy', NULL, NULL, NULL, NULL),
            (33, 'zzzzzzzzzzzzzzzzzz', 'dddddddd', 1989, 0.05, b'011'),
            (24,  'wwwwwwwwwwwwwwwwwwwwwwwwwwww', 'dddddddd', 1990, 0.01,  b'101'),
            (11, 'yyy', 'ccccccccc', 1999, 0.1, NULL),
            (25, 'zzzzzzzzzzzzzzzzzz', 'bbb', 1989, 0.01,  b'101');
           
          ANALYZE TABLE t2;
           
          SELECT COUNT(DISTINCT t2.e, t2.b, t2.d) FROM t2;

          It looks like fields of the DATE type trigger the complain.

          igor Igor Babaev (Inactive) added a comment - - edited There is no complains with the following test case: CREATE TABLE t2 ( a int NOT NULL PRIMARY KEY , b varchar (32), c char (16), d int , e double , f bit (3), INDEX idx1 (b, e), INDEX idx2 (c, d), INDEX idx3 (d), INDEX idx4 (e, b, d) ) ENGINE= MYISAM;   INSERT INTO t2 VALUES (0, NULL , NULL , NULL , NULL , NULL ), (7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'dddddddd' , 1990, 0.1, b '100' ), (17, 'vvvvvvvvvvvvv' , 'aaaa' , 1989, 0.01, b '101' ), (1, 'vvvvvvvvvvvvv' , NULL , 1989, 0.01, b '100' ), (12, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'dddddddd' , 1999, 0.112, b '001' ), (23, 'vvvvvvvvvvvvv' , 'dddddddd' , 1999, 0.1, b '100' ), (8, 'vvvvvvvvvvvvv' , 'aaaa' , 1999, 0.1, b '100' ), (22, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'aaaa' , 1989, 0.112, b '001' ), (31, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa' , 1997, 0.01, b '001' ), (10, NULL , 'aaaa' , NULL , 0.01, b '010' ), (5, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'dddddddd' , 1999, 0.1, b '100' ), (15, 'vvvvvvvvvvvvv' , 'ccccccccc' , 1990, 0.1, b '010' ), (30, NULL , 'bbbbbb' , NULL , NULL , b '100' ), (38, 'zzzzzzzzzzzzzzzzzz' , 'bbbbbb' , NULL , NULL , NULL ), (18, 'zzzzzzzzzzzzzzzzzz' , 'ccccccccc' , 1990, 0.01, b '010' ), (9, 'yyy' , 'bbbbbb' , 1998, 0.01, NULL ), (29, 'vvvvvvvvvvvvv' , 'dddddddd' , 1999, 0.012, b '010' ), (3, 'yyy' , 'dddddddd' , 1990, 0.112, b '010' ), (39, 'zzzzzzzzzzzzzzzzzz' , 'bbbbbb' , NULL , 0.01, b '100' ), (14, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'ccccccccc' , 1990, 0.1, b '100' ), (40, 'zzzzzzzzzzzzzzzzzz' , 'bbbbbb' , 1989, NULL , NULL ), (44, NULL , 'aaaa' , 1989, NULL , b '010' ), (19, 'vvvvvvvvvvvvv' , 'ccccccccc' , 1990, 0.012, b '011' ), (21, 'zzzzzzzzzzzzzzzzzz' , 'dddddddd' , 1989, 0.112, b '100' ), (45, NULL , NULL , 1989, NULL , b '011' ), (2, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'ccccccccc' , 1990, 0.1, b '001' ), (35, 'yyy' , 'aaaa' , 1990, 0.05, b '011' ), (4, 'vvvvvvvvvvvvv' , 'dddddddd' , 1999, 0.01, b '101' ), (47, NULL , 'aaaa' , 1990, 0.05, b '010' ), (42, NULL , 'ccccccccc' , 1989, 0.01, b '010' ), (32, NULL , 'bbbbbb' , 1990, 0.01, b '011' ), (49, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'aaaa' , 1990, NULL , NULL ), (43, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'bbbbbb' , 1990, NULL , b '100' ), (37, 'yyy' , NULL , 1989, 0.05, b '011' ), (41, 'xxxxxxxxxxxxxxxxxxxxxxxxxx' , 'ccccccccc' , 1990, 0.05, NULL ), (34, 'yyy' , NULL , NULL , NULL , NULL ), (33, 'zzzzzzzzzzzzzzzzzz' , 'dddddddd' , 1989, 0.05, b '011' ), (24, 'wwwwwwwwwwwwwwwwwwwwwwwwwwww' , 'dddddddd' , 1990, 0.01, b '101' ), (11, 'yyy' , 'ccccccccc' , 1999, 0.1, NULL ), (25, 'zzzzzzzzzzzzzzzzzz' , 'bbb' , 1989, 0.01, b '101' );   ANALYZE TABLE t2;   SELECT COUNT ( DISTINCT t2.e, t2.b, t2.d) FROM t2; It looks like fields of the DATE type trigger the complain.

          People

            igor Igor Babaev (Inactive)
            igor Igor Babaev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.