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

Index for (specific) Aria table is created as corrupted

    XMLWordPrintable

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

            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.