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

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

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Assignee Elena Stepanova [ elenst ] Sergei Golubchik [ serg ]
            elenst Elena Stepanova made changes -
            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:
            {code:sql}
            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;
            {code}

            {noformat:title=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
            {noformat}

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

            {code:sql}
            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;
            {code}

            {noformat:title=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
            {noformat}
            _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:
            {code:sql}
            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;
            {code}

            {noformat:title=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
            {noformat}
            {noformat}
            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'
            {noformat}

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

            {code:sql}
            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;
            {code}

            {noformat:title=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
            {noformat}
            {noformat}
            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'
            {noformat}
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            Assignee Sergei Golubchik [ serg ] Oleksandr Byelkin [ sanja ]

            Still reproducible.

            elenst Elena Stepanova added a comment - Still reproducible.
            monty Michael Widenius made changes -
            Assignee Oleksandr Byelkin [ sanja ] Michael Widenius [ monty ]

            MDEV-19055 fixed this issue

            monty Michael Widenius added a comment - MDEV-19055 fixed this issue
            monty Michael Widenius made changes -

            Fixed as part of MDEV-19055

            monty Michael Widenius added a comment - Fixed as part of MDEV-19055
            monty Michael Widenius made changes -
            issue.field.resolutiondate 2019-06-18 07:28:44.0 2019-06-18 07:28:44.639
            monty Michael Widenius made changes -
            Fix Version/s 10.2.26 [ 23409 ]
            Fix Version/s 10.3.17 [ 23411 ]
            Fix Version/s 10.4.6 [ 23412 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 90529 ] MariaDB v4 [ 155178 ]

            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.