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

Error 175 "File too short; Expected more data in file" upon SELECT with re-opened temporary table after concurrent OPTIMIZE and DDL

    XMLWordPrintable

Details

    Description

      Note: See also MDEV-17636, they share essential parts of the test case, might be related.

      Note: Run the test cases with --repeat=N. They usually fail for me within 5 attempts, but it can vary on different machines and builds.

      This one only fails with Aria:

      CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=Aria;
       
      --connect (con1,localhost,root,,test)
      CREATE TEMPORARY TABLE tmp (pk INT)  ENGINE=Aria;
      INSERT INTO tmp (pk) VALUES (NULL); 
      SELECT * FROM tmp tx, tmp ty;
      DELETE FROM tmp LIMIT 1;
       
      --connection default
      --send
        CREATE TABLE t2 SELECT * FROM t1;
       
      --connection con1
      OPTIMIZE TABLE tmp;
      --connection default
      --reap
       
      --connection con1
      INSERT INTO tmp VALUES (1);
      SELECT * FROM tmp tx, tmp ty;
       
      # Cleanup
      --disconnect con1
      --connection default
      DROP TABLE t1, t2;
      

      10.2 5cfb043d29

      mysqltest: At line 20: query 'SELECT * FROM tmp tx, tmp ty' failed: 1030: Got error 175 "File too short; Expected more data in file" from storage engine Aria
      

      2018-11-10 19:27:57 140306518107904 [ERROR] Got error 175 when reading table '/data/bld/10.2/mysql-test/var/tmp/mysqld.1/#sql445c_a_2'
      

      This one fails both with Aria and MyISAM (slightly more complicated SELECTs), otherwise the same:

      CREATE TABLE t1 (pk INT PRIMARY KEY);
       
      --connect (con1,localhost,root,,test)
      CREATE TEMPORARY TABLE tmp (pk INT);
      INSERT INTO tmp (pk) VALUES (NULL); 
      SELECT pk FROM t1 WHERE pk IN ( SELECT pk FROM tmp )
        UNION
      SELECT pk FROM t1 WHERE pk IN ( SELECT pk FROM tmp );
      DELETE FROM tmp LIMIT 1;
       
      --connection default
      --send
        CREATE TABLE t2 SELECT * FROM t1;
       
      --connection con1
      OPTIMIZE TABLE tmp;
      --connection default
      --reap
       
      --connection con1
      INSERT INTO tmp VALUES (1),(2);
      DELETE FROM tmp LIMIT 1;
      SELECT * FROM tmp tx, tmp ty;
       
      # Cleanup
      --disconnect con1
      --connection default
      DROP TABLE t1, t2;
      

      10.2 5cfb043d29

      mysqltest: At line 23: query 'SELECT * FROM tmp tx, tmp ty' failed: 1030: Got error 175 "File too short; Expected more data in file" from storage engine MyISAM
      

      2018-11-10 19:28:34 140373883832064 [ERROR] Got error 175 when reading table '/data/bld/10.2/mysql-test/var/tmp/mysqld.1/#sql44b3_5_0'
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.