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

ERROR 1114 Stored Procedure/Create Temporary Table

Details

    Description

      I am attempting to move to the MariaDB 10.2 line for my production application. Previously my upgrade to 10.2 was blocked by MDEV-14857. Now in 10.2.13 this issue has been resolved, however I am running into a new problem. I have a nightly job that runs in a stored procedure that fails in MariaDB 10.2.13. The error I am getting is below:

      ERROR 1114 (HY000): The table '#sql-daf_13' is fulldone

      I realize that this error is normally due to a configuration issue, however look at the end of the error string, it says "done" after full.

      I have narrowed down the issue using the following reproduction steps:

      1. I have uploaded a sql script to ftp.askmonty.org/private called brycejlowe-permtest.sql
      2. Install MariaDB 10.2.13 and source in the file, it creates a schema called scratch and a table called permtest1 which has about 422,000 rows in it.
      3. Execute the following statements against that table:

        CREATE TEMPORARY TABLE scratch.temptest1 LIKE scratch.permtest1;
        INSERT INTO scratch.temptest1 SELECT * FROM scratch.permtest1;
         
        CREATE TEMPORARY TABLE scratch.temptest2 SELECT * FROM scratch.temptest1;
        ALTER TABLE scratch.temptest2 ADD INDEX `part`(`Part_no`);
        

      The result in MariaDB 10.2.8 through 10.2.12 is a temporary table scratch.temptest2 with an index called part. However the result in 10.2.13 is the error:

      ERROR 1114 (HY000): The table '#sql-daf_13' is fulldone

      Attachments

        Activity

          brycejlowe Bryce Lowe added a comment -

          NOTE: I am not seeing the issue in 10.1.31.

          brycejlowe Bryce Lowe added a comment - NOTE: I am not seeing the issue in 10.1.31.

          brycejlowe,
          Thanks for the report and test case.
          Can we use data from brycejlowe-permtest.sql on public resources, or do you prefer it to be kept confidential?

          elenst Elena Stepanova added a comment - brycejlowe , Thanks for the report and test case. Can we use data from brycejlowe-permtest.sql on public resources, or do you prefer it to be kept confidential?
          brycejlowe Bryce Lowe added a comment -

          Feel free to make it a public resource.

          brycejlowe Bryce Lowe added a comment - Feel free to make it a public resource.
          alice Alice Sherepa added a comment -

          Reproducible on 10.2.13, not on 10.3.4, not on current 10.2
          Message is "table is full", there are leftovers after " Stage: 1 of 2 'copy to tmp table' 19.2% of stage done", and the word "done" remains.

           
          CREATE TABLE `t1` (
            `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
            `Part_No` varchar(15) NOT NULL,
            `IQty` float DEFAULT 0,
            `DQty` float DEFAULT 0,
            `TQty` float DEFAULT 0,
            `OHQty` float DEFAULT 0,
            `OOQty` float DEFAULT 0,
            `RQty` float DEFAULT 0,
            `Level` int(10) unsigned DEFAULT 1,
            `Part_Type` char(1) DEFAULT '1',
            `Period` int(10) unsigned DEFAULT NULL,
            `EcoList` varchar(50) NOT NULL,
            `MQty` float DEFAULT NULL,
            `BQty` float DEFAULT NULL,
            PRIMARY KEY (`id`),
            KEY `Part` (`Part_No`),
            KEY `pnp` (`Part_No`,`Period`)
          );
           
          INSERT INTO t1 (id,Part_No,EcoList,MQty,BQty) SELECT seq,seq,seq,seq,seq FROM seq_1_to_1000000;
           
          CREATE TEMPORARY TABLE tt1 LIKE t1;
          INSERT INTO tt1 SELECT * FROM t1;
           
          CREATE TEMPORARY TABLE tt2 SELECT * FROM tt1;
          ALTER TABLE tt2 ADD INDEX `part`(`Part_no`);
          

          alice Alice Sherepa added a comment - Reproducible on 10.2.13, not on 10.3.4, not on current 10.2 Message is "table is full", there are leftovers after " Stage: 1 of 2 'copy to tmp table' 19.2% of stage done", and the word "done" remains.   CREATE TABLE `t1` ( `id` int (10) unsigned NOT NULL AUTO_INCREMENT, `Part_No` varchar (15) NOT NULL , `IQty` float DEFAULT 0, `DQty` float DEFAULT 0, `TQty` float DEFAULT 0, `OHQty` float DEFAULT 0, `OOQty` float DEFAULT 0, `RQty` float DEFAULT 0, ` Level ` int (10) unsigned DEFAULT 1, `Part_Type` char (1) DEFAULT '1' , `Period` int (10) unsigned DEFAULT NULL , `EcoList` varchar (50) NOT NULL , `MQty` float DEFAULT NULL , `BQty` float DEFAULT NULL , PRIMARY KEY (`id`), KEY `Part` (`Part_No`), KEY `pnp` (`Part_No`,`Period`) );   INSERT INTO t1 (id,Part_No,EcoList,MQty,BQty) SELECT seq,seq,seq,seq,seq FROM seq_1_to_1000000;   CREATE TEMPORARY TABLE tt1 LIKE t1; INSERT INTO tt1 SELECT * FROM t1;   CREATE TEMPORARY TABLE tt2 SELECT * FROM tt1; ALTER TABLE tt2 ADD INDEX `part`(`Part_no`);

          Apparently it was fixed in 10.2 tree just a few days ago, by this commit:

          commit 852c35f571b1b7454aab5768899e2faee8f941d4
          Author: Marko Mäkelä <marko.makela@mariadb.com>
          Date:   Mon Feb 19 14:58:05 2018 +0200
           
              MDEV-11581 follow-up fix: Correct a condition
              
              fsp_fill_free_list(): Correctly determine whether the temporary
              tablespace file should be extended in order to respond to a
              page allocation request. The inverted condition was noticed
              by Thiru when he analyzed MDEV-13013.
          

          elenst Elena Stepanova added a comment - Apparently it was fixed in 10.2 tree just a few days ago, by this commit: commit 852c35f571b1b7454aab5768899e2faee8f941d4 Author: Marko Mäkelä <marko.makela@mariadb.com> Date: Mon Feb 19 14:58:05 2018 +0200   MDEV-11581 follow-up fix: Correct a condition fsp_fill_free_list(): Correctly determine whether the temporary tablespace file should be extended in order to respond to a page allocation request. The inverted condition was noticed by Thiru when he analyzed MDEV-13013.

          People

            Unassigned Unassigned
            brycejlowe Bryce Lowe
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.