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

ERROR 1032 (HY000): Can't find record with MyISAM, (too?) large key and DISABLE KEYS

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4.19, 10.4(EOL), 10.5, 10.6, 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
    • 10.5, 10.6, 10.11
    • None

    Description

      This runs just fine:

      CREATE TABLE `test` (
        `id` int unsigned NOT NULL,
        `foo` varchar(255) NOT NULL,
        PRIMARY KEY (`id`),
        UNIQUE KEY `foo_key` (`foo`)
      ) ENGINE=MyISAM;
      INSERT INTO `test` VALUES (1,'dummy');
      

      However, when first disabling keys (commonly seen when using mysqldump) the INSERT query fails with an ERROR 1032 (HY000): Can't find record in 'test':

      DROP TABLE IF EXISTS `test`;
      CREATE TABLE `test` (
        `id` int unsigned NOT NULL,
        `foo` varchar(255) NOT NULL,
        PRIMARY KEY (`id`),
        UNIQUE KEY `foo_key` (`foo`)
      ) ENGINE=MyISAM;
      ALTER TABLE `test` DISABLE KEYS;
      INSERT INTO `test` VALUES (1,'dummy');
      

      Character set being used is utf8mb4

      If you use the ARIA storage engine, the CREATE statement will fail with ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes (varchar(255) in utf8mb4 is 1020 bytes).
      If you use the InnoDB storage engine, there is no issue.
      If you change the column foo to a varchar(250), it works fine as well.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              tgm Martijn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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