Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34522

Index for (specific) Aria table is created as corrupted

Details

    Description

      For specific Aria table and data (see later private message for more details):

      MariaDB [db]> show create table T\G
      *************************** 1. row ***************************
             Table: imsmvi_fa_redacted
      Create Table: CREATE TABLE `T` (
        `SMFDATETIME` datetime DEFAULT NULL,
      ...
        `SMFHOUR` int(11) DEFAULT NULL,
      ...
      ) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=0 ROW_FORMAT=PAGE TRANSACTIONAL=0;
       
      MariaDB [db]> select count(*) from T;
      +----------+
      | count(*) |
      +----------+
      |  8594605 |
      +----------+
      1 row in set (0,050 sec)
      

      with no indexes, the index on a column with a small number of distinct values (hours of the day) is create corrupted, on 10.6.19 built from current GitHub source and started with --no-defaults:

      MariaDB [db]> create index T_smfhour on T(smfhour); show warnings;
      ERROR 1034 (HY000): Number of rows changed from 8594605 to 2296732
      +-------+------+------------------------------------------------+
      | Level | Code | Message                                        |
      +-------+------+------------------------------------------------+
      | Error | 1034 | Number of rows changed from 8594605 to 2296732 |
      +-------+------+------------------------------------------------+
      1 row in set (0,000 sec)
       
      MariaDB [db]> select count(*) from T;
      +----------+
      | count(*) |
      +----------+
      |  2296732 |
      +----------+
      1 row in set (0,015 sec)
       
      MariaDB [bad_redacted_db]> check table T;
      +------------------------------------+-------+----------+--------------------------------------------------------------+
      | Table                              | Op    | Msg_type | Msg_text                                                     |
      +------------------------------------+-------+----------+--------------------------------------------------------------+
      | db.T | check | error    | Record-count is not ok; found    8594605  Should be: 2296732 |
      | db.T | check | error    | Key pointers and record positions doesn't match              |
      | db.T | check | error    | Checksum for key:  1 doesn't match checksum for records      |
      | db.T | check | error    | Corrupt                                                      |
      +------------------------------------+-------+----------+--------------------------------------------------------------+
      4 rows in set (1 min 33,710 sec)
      

      This was NOT the case on a pre-release 10.6.18 built from GitHub, so somehow there is a recent regression introduced at the later stage of 10.6.18 and/or 10.6.19 development..

      Attachments

        Issue Links

          Activity

            valerii Valerii Kravchuk created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            alice Alice Sherepa made changes -
            Affects Version/s 10.6.18 [ 29627 ]
            alice Alice Sherepa made changes -
            Affects Version/s 10.5.25 [ 29626 ]
            alice Alice Sherepa made changes -
            Labels corruption regression regression-10.6 corruption regression
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.5 [ 29506 ]
            alice Alice Sherepa made changes -
            Priority Major [ 3 ] Blocker [ 1 ]
            alice Alice Sherepa made changes -
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.11 [ 27614 ]
            Affects Version/s 11.0 [ 28320 ]
            Affects Version/s 11.1 [ 28549 ]
            Affects Version/s 11.2 [ 28603 ]
            Affects Version/s 11.3 [ 28565 ]
            Affects Version/s 11.4 [ 29301 ]
            Affects Version/s 11.5 [ 29506 ]
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            alice Alice Sherepa made changes -
            Assignee Michael Widenius [ monty ]
            monty Michael Widenius made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]

            alice Do you have a test case for this?
            I

            monty Michael Widenius added a comment - alice Do you have a test case for this? I

            Pushed 10.5 tree

            monty Michael Widenius added a comment - Pushed 10.5 tree
            monty Michael Widenius made changes -
            issue.field.resolutiondate 2024-07-07 10:36:35.0 2024-07-07 10:36:34.545
            monty Michael Widenius made changes -
            Fix Version/s 10.5.26 [ 29832 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.5 [ 29506 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.6.19 [ 29833 ]
            Fix Version/s 10.11.9 [ 29834 ]
            Fix Version/s 11.1.6 [ 29835 ]
            Fix Version/s 11.2.5 [ 29836 ]
            Fix Version/s 11.4.3 [ 29837 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk Related Tickets 202701
            Zendesk active tickets 202701
            mariadb-jira-automation Jira Automation (IT) made changes -
            Zendesk active tickets 202701
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -

            People

              monty Michael Widenius
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.